Sorry for posting again.
I have updated the previous code but still no luck. I am trying to count the number of characters in the code, the number printed is always the number to which i initialised "ch" to, so am guessing the counter is not working. If anyone has any ideas it would be greatly appreciated. Thanks in advance.
FILE * input_file;
printf("Please enter the file you wish to open: ");
void content( )
rval=fscanf(input_file, "%s", file);
printf("The file contains the following text:- %s", file);
printf("Error opening file");
void characters( )
printf("Error counting characters");
printf("\nThe file is %d characters long.\n", ch);