#include <stdio.h>int getchar(void);
The getchar( ) function returns the next character from stdin. The character is read as an unsigned char that is converted to an integer.
If the end of the file is reached, getchar( ) returns EOF. If getchar( ) encounters an error, EOF is also returned.
The getchar( ) function is often implemented as a macro.
Related functions are fputc( ), fgetc( ), putc( ), and fopen( ).