getchar(): It reads a character from the keyboard. It is executed when a key is pressed and the pressed key is echoed to screen.
Syntax of getchar():
Disadvantage of getchar() is that the input keeps buffering till enter is pressed. This process is known as line buffered input. In this process you have to hit enter first to send anything to your program. Because of this getchar() is not favored in interactive environments. Hence two more functions getch() and getche() are used in place of getchar().
getch(): getch() function returns just after the keypress and the pressed key is not echoed to screen. It can be used in an interactive environment.
Syntax of getch():
getche(): getch() function returns just after the keypress and the pressed key is echoed to the screen. It can be used in an interactive environment.
putchar(): At current cursor position, putchar() prints a character to screen.
int putchar(int c);