Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getchar(III) — UNIX 6th Edition 1.3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getc (III)

GETCHAR(III)  −  PWB/UNIX 4/7/73

NAME

getchar − read character

SYNOPSIS

getchar( )

DESCRIPTION

Getchar provides the simplest means of reading characters from the standard input for C programs.  It returns successive characters until end-of-file, when it returns “\0”.  Associated with this routine is an external variable called fin, which is a structure containing a buffer such as described under getc (III).  Generally speaking, getchar should be used only for the simplest applications; getc is better when there are multiple input files. 

SEE ALSO

getc (III)

DIAGNOSTICS

Null character returned on EOF or error. 

BUGS

−1 should be returned on EOF; null is a legitimate character. 

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