for (i = 0;i < e;i++)
{
// take the excuse
scanf(" %[^\n]", excuses[i]);
excuse_count[i] = 0;
while (sscanf(excuses[i], " %[a-zA-z]", word) != EOF)
}
The input was
My dog ate my homework
but at the while loop word is getting the word "My" in each loop. In case of scanf, when it reads from the stdin, each time it is called it reads and advances the read pointer. But I guess for sscanf the behavior is different. What I want is sscanf to act like scanf and read and advance the file pointer? Am I missing anything or this is not possible with sscanf? In that case how to accomplish this?
PS: Does anyone know why firefox is showing "behavior" as a wrong spelling while I am typing here in this text area?