Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Coherent 3.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


getchar()                  STDIO Macro                  getchar()




Read character from standard input

#include <stdio.h>
int getchar()

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


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026