Hi, this is a simple task but i've been breaking my head over it for a day and can't figure out what the problem is. Any help would be good.
Why is this printing EOOOOF then blank? I just want a simple program that reads from a file and stores a string without white spaces into a string. This is a simple task but for some reason it's always scanning from the end of the file therefore returning blank spaces into the string. Thank You for any help.
# include <string.h>
strcpy(key, " ");
FILE *pFile = fopen("testing", "a");
fprintf(pFile, "HELLO WORLD");
int i = fscanf(pFile,key);