I am trying to read an external text file. The file contains both numbers and words in the form:
hello 1239 4943 melissa
(with each element on its own line) The actual text file has over 1200 words. I want to read each line and store them as strings, but fscanf skips over the numbers. How can I read the numbers into my program and store them as strings?
char word[1263][13];
FILE * fh;
fh=fopen("wordlist.txt","r");
for (a=0;a<1263;a++)
{
fscanf(fh,"%s",word[a]);
}
fclose(fh);