I am writing a small program which needs to create a new file with the user’s content in “C” program using following code.
FILE *fp = fopen ("test.txt", "wb");
fclose (fp);
The result is creating a new file with same name but in upper case like “TEST.TXT”.
How Can I fix this.
Note:
I am using Turbo C, in windows with .c extension.
If you’re using Turbo C it’s probably happening because it’s using old MS-DOS APIs to access the file system. Those APIs likely force filenames to uppercase for compatibility purposes.