You should include ctype.h (for isalpha and isdigit).
You should use getchar (instead of the non-standard getch).
spac is "unused" (and doesn't have enough space to hold a string with a single space, since that would require 2 characters, even with maximum stinginess ).
If you want a character array to be the exact length necessary to hold a string constant used as an initializer, just leave the brackets blank.
You don't need to flush a file just before you close it since fclose will flush it first. Actually, I don't see a reason for any of the flushes you're doing.Code:const char stats[] = "****************************************";
Don't use + in the file opening modes unless you need it. It is used to both read and write from a file. If you're just doing one or the other, don't use +.
When you check if a file has opened properly, you can't just print an error message and continue as if nothing happened. You have to do something about it. The easiest thing is to exit(EXIT_FAILURE).
And try printing cFilename after the snprintf's. That might be interesting!