Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

(In C prog.) What is the difference between scanf, getche and getchar?

OpenStudy (anonymous):

Scanf is a standard C function, while getch and getchar are not. Scanf will read a stream and can even take formatted input, but getch and getchar will only take a single character. getchar() will read in a single character and wait for the user to hit the enter key before reading. getch() will immediately return the first character read or on any keyboard input.

OpenStudy (anonymous):

@ArrowsAndDaggers getchar() is actually part of the C standard library. But you're right on all the other points.

OpenStudy (anonymous):

getch() and getche() are both from the <conio.h> include file, part of some old MS-DOS C compilers. getch() takes a single character keypress from the user, without echoing the character on the screen, whereas getche() echoes the character on the screen.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!