

getchar()                  STDIO Macro                  getchar()




Read character from standard input

#include <stdio.h>
iinntt ggeettcchhaarr()

getchar is  a macro that reads a character  from the standard in-
put.  It is equivalent to getc(stdin).

***** Example *****

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);
}


***** See Also *****

getc(), putchar(), STDIO

***** Diagnostics *****

getchar returns EOF at end of file or on read error.

























COHERENT Lexicon                                           Page 1


