The function getchar() is found in the ANSI C stdio library.
It's prototype is int getchar (void) ;
Although its name is getchar() notice that it returns an int. This is
okay since characters are stored basically as ints anyway.
getchar() returns the next character (only one) from the standard input
stream.
As the user types characters at the keyboard, these characters are placed
into a memory area called a buffer. This continues until the user types a
newline character.
When the newline character is typed, all of the character that were entered
are feed into the input stream, stdin, in the order entered, and can be
accessed by the program.