Ceteris paribus (well formed data, good buffering practices and what not), is there a reason why I prefer to loop while the return of scanf is 1, rather than !EOF? I may have read this somewhere, or whatever, but I may have it wrong as well. What do other people think?
Ceteris paribus (well formed data, good buffering practices and what not), is there a
Share
scanfreturns the number of items succesfully converted … or EOF on error. So code the condition the way it makes sense.Contrived example
Edit: added another more contrived example