96
The idiom is more useful when you're writing a while loop instead of an if statement. For an if statement, you can break it up as you describe. But without this construct, you would either have to repeat yourself:
c = getchar();
while (c != EOF) {
// ...
c = getchar();
}
or use a loop-and-a-half structure:
while (true) {
c = getchar();
if (c == EOF) break;
// ...
}
I would usually prefer the loop-and-a-half form.