I am having a problem with input/output. I have created a text file called input.txt and want to move this to output.txt
I have been able to move a single character over with %c but when I have tried to use %s it doesn't appear to work.
This is the code I have used:
void main (void)
for(counter=0; counter<200; counter++)
if ((f_input = fopen("input.txt","r"))==NULL)
printf("Cannot open file\n");
if ((f_output = fopen("output.txt","w"))==NULL)
printf("Cannot open file for writing\n");
fprintf(f_output,"The input file contained the following: %c \n",temp_char);
Can anyone help, thanks if you can.