whats the difference between fscanf and fgets in file handling(In C)?
fscanf does not perform bounds checking. fgets is likely going to be the better choice. You can then use sscanf() to evaluate it.
more info
IBM TPF Product Information Center
fscanf - C++ Reference
fgets - C++ Reference
scanf vs fgets?
BTW one more thing, never use scanf for input, use cin. Google it up if u want to know why, too many reasons for me to type
Why suggest std::cin when the OP is using C, and confuse him?
^^ yes i thought it too
but the advantage(s) of C++ over C must be kept in mind
^^ yes that, i'am sorry about the post.
i should have explained it.
reading this post now, i sound a lot like my coll professors
u explained it very well. thankyou