62.1k views
4 votes
(In C prog.) What is the difference between scanf, getche and getchar?

User Iamjpg
by
8.0k points

1 Answer

5 votes
getchar() only reads a single character input from any input stream.
getche() reads a single character from the keyboard and displays immediately on output screen without waiting for enter key
scanf() reads the whole input line according to the data type you specified.


User Jason Antman
by
8.5k points

Related questions

asked Sep 4, 2024 11.1k views
Gfekri asked Sep 4, 2024
by Gfekri
6.8k points
1 answer
3 votes
11.1k views