+ 1
Function
Can uh explain difference b/w getchar and gets
2 Answers
+ 2
getchar is used to read single character from console.
0
getchar() function reads a character from the terminal and returns it as an integer and it reads only single character at a time.Ā
Ā gets() Ā function reads a line fromĀ standard input into the buffer pointed to byĀ strĀ pointer, until either a terminating newline or end of file occurs.