What is the difference between getch() and getchar()?

bubble picture bubble · Feb 7, 2012 · Viewed 47.3k times · Source

What is the exact difference between the getch and getchar functions?

Answer

Roy Dictus picture Roy Dictus · Feb 7, 2012

getchar() is a standard function that gets a character from the stdin.

getch() is non-standard. It gets a character from the keyboard (which may be different from stdin) and does not echo it.