Probably an extremely simple answer to this extremely simple question:
I\'m reading \"C Primer Plus\" by Pratta and he keeps using the example
while
In C, 0 is evaluated to false and everything else to true. Thus, if scanf returned EOF, which is a negative value, the loop would evaluate to true, which is not what you'd want.