+ 1
Difference between scanf(), get() and getchar()?
How do i know when to use each one in C?
3 Answers
+ 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?