+ 1
Difference between scanf(), get() and getchar()?
How do i know when to use each one in C?
3 Réponses
+ 2
Kingdavid, EOF is end-of-file (don’t really need to worry about this unless redirecting input to stdin).
Gets will grab the input up to the newline, so it includes whitespace.
You’ve also got fgets, which unlike gets will stop at an EOF.
+ 2
Getchar grabs the first character from the std input stream (stdin) - keyboard entry. Only one character.
Scanf will grab input up to a whitespace, new line of EOF.
…do you mean gets()?
0
DavX yes i mean gets(), and what's EOF?