I want to know what is the difference between fgets()
and scanf()
. I am using C as my platform.
Scanf does not perform bounds checking. fgets is likely going to be the better choice. You can then use sscanf() to evaluate it.
Good discussion of the topic here- http://cboard.cprogramming.com/c-programming/109243-scanf-vs-fgets.html
How do you allow spaces to be entered using scanf? (That was my evil twin getting lectured for forgetting this- not me)