|
|
coherent
getchar() STDIO Macro getchar()
Read character from standard input
#include <stdio.h>
iinntt ggeettcchhaarr()
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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.