+ 1

Function

Can uh explain difference b/w getchar and gets

25th Dec 2019, 10:09 AM
Shivam
2 odpowiedzi
+ 2
getchar is used to read single character from console.
25th Dec 2019, 10:18 AM
Jaydeep Khatri
Jaydeep Khatri - avatar
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.
25th Dec 2019, 11:26 AM
Yoga
Yoga - avatar