The C library function int getchar(void) gets a character (an unsigned char) from stdin. This is equivalent to getc with stdin as its argument.
int getchar(void)
#include int main () { char c; printf("Enter character: "); c = getchar(); printf("Character entered: "); putchar(c); return(0); }
Enter character: a Character entered: a
Nothing
Nothing