Which file readers in C can handle reading an inconsistent file? Sometimes the file is "word number" and other times it is just "word". Like this.
bob 456
echo
cat
dog 1101
peacock 300
This is what I tried with fscanf. I am surprised it worked. I didn't think fscanf liked inconsistent files. Is there something I need to be worried about? I know fscanf has really bad side effects if you are not careful.
while (fscanf(pFile, "%s %d", nam, &val) !=EOF)
{
//my work
}