flush forces data to be written immediately. sometimes output can be delayed as it is buffered up for efficiency.
I have never seen it this way: I have always seen it as 2 statements:
printf();
fflush(stdout);
the author thinks the flush is needed. This may depend on the compiler, OS, or other factors whether it really is or not. you can take it out if it works for you without it.
You will find a lot of old code where people use a comma instead of a compound statement proper. It's a common trap people fall into.
In this case the side effects are k own and sequenced, so the two statements can be joined by comma, but it would be better to just use curly braces, which improve comprehension and reduce maintenance errors
You will find a lot of old code where people use a comma instead of a compound statement proper. It's a common trap people fall into.
Based on things people post here, it seems that the comma is the "read my mind and do what I really wanted" operator. When people can't be bothered to look up the syntax for the operation they actually want to do, they just throw in a comma without having the slightest idea what it actually does, and assume it will somehow magically do what they want it to do.