getchar

Gets one character from the standard input stream

#include <stdio.h>
char getchar (
        void
)

Arguments

None

Return Value

The next character read from the standard input stream is returned if the function was successful. Otherwise, EOF is returned in case of end-of-file or error.

Explanation

The next character is read from the standard input stream and returned.
getchar() is equivalent to getc(stdin).

See Also

getc(), gets()