Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@whats-in-name-KdgM7o • Apr 11, 2013
scanf returns the number of items assigned,EOF means end-of-file and has value -1,so this statement probably means run the loop 2 times.
*Please correct me,if I am wrong -
@rahul69-97fAOs • Apr 11, 2013
This statement simply means keep on scanning the values of m and n until End of File is reached.lit-857wts EOF AND IS SCANF returen values?
Scanf returns number of variables scanned normally but it returns EOF if End of File is reached before variables could be scanned.😀 -
@prateek-gupta-Vp5hwc • Apr 17, 2013
scanf :- used to scan the values.
EOF:- indicates the End Of File.
!= :- relational operator (not equal to)
this can be understood like this :-
keep scanning the values in variables n and m from the file until EOF has not been found.