I am creating a program which reads data from one text file and changes it size to upper or lower case and then stores that data in a new file. I have searched the internet, but I can't find how to create a new text file.
#include <stdio.h>
int main(void) {
FILE *fp = NULL;
fp = fopen("textFile.txt" ,"a");
char choice;
if (fp != NULL) {
printf("Change Case \n");
printf("============\n");
printf("Case (U for upper, L for lower) : ");
scanf(" %c", &choice);
printf("Name of the original file : textFile.txt \n");
printf("Name of the updated file : newFile.txt \n");
I know this is incomplete, but I can't figure out how to crate a new text file!