Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This chapter’s goal was to explain a few additional input and output functions. The functions presented here are character I/O functions. Unlike scanf() and printf(), the getchar(), getch(), putchar(), and putch() functions input and output single characters at a time.
You’ll often find the getch() and getchar() functions used inside large input routines that build input. This means that these functions get a character at a time from the keyboard and add those characters to an array that is checked against a string value of some kind.