ggeettcchhaarr() -- STDIO Function (libc)

Read character from standard input
#iinncclluuddee <ssttddiioo.hh>
iinntt ggeettcchhaarr()

ggeettcchhaarr() reads  a character from the standard input.   It is equivalent to
ggeettcc(ssttddiinn).

_E_x_a_m_p_l_e
The following  example gets one  or more characters from  the keyboard, and
echoes them on the screen.

#include <stdio.h>

main()
{
    int foo;
    while ((foo = getchar()) != EOF)
        putchar(foo);
}

_S_e_e _A_l_s_o
ggeettcc(), lliibbcc, ppuuttcchhaarr()
ANSI Standard, section 7.9.7.6
POSIX Standard, section 8.1

_D_i_a_g_n_o_s_t_i_c_s
ggeettcchhaarr() returns EEOOFF at end of file or on read error.

If you  wish to receive  characters from the  keyboard immediately, without
waiting for the enter key, see the example in the entry for ppiippee().
