06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

getchar pREPC+ <strong>System</strong> <strong>Calls</strong><br />

getchar Gets a character from stdin.<br />

#include <br />

#include <br />

int getchar(<br />

void<br />

)<br />

Description<br />

Return Value<br />

Error Codes<br />

Notes<br />

See Also<br />

The getchar() function reads the next character from the standard input device. It<br />

is equivalent to getc(stdin).<br />

This function returns the character that is read. If EOF is detected, the stdin EOF<br />

flag is set. If a read error occurs, stdin's error flag is set. In both cases, EOF is<br />

returned. If an error occurs, errno is set.<br />

Refer to Appendix B.<br />

Callable From<br />

■ Task<br />

putchar, getc<br />

3-70 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!