I have a question regarding this code. This code is supposed to extract ASCII values from the input in the file testme.txt (which only contains: KMN) and then convert every character to ASCII (K = 75. M = 77, etc..) but for some reason the code only converts the first character.
I want to use fscanf only.
FILE *inp, *outp;
inp = fopen("testme.txt","r");
outp = fopen("testme.out","w");
printf("The number read from the file is %d.\n",ac);
fprintf(outp,"ASCII was %d.\n",ac);