up: programming - C - File I/O  
programming - C - function getcharWhat links here?

prototype

int getchar(void)


Description

The getchar() function gets a character from stdin. It is equivalent to getc(stdin).

Parameters

None.

Return Values

The getchar() function returns the next character from stdin. If stdin is at the end of the file, the end-of-file indicator for stdin is set and getchar() returns EOF. If a read error occurs, the error indicator for stdin is set and getchar() returns EOF. The functions feof() and ferror() can be used to distinguish error conditions from EOF.

On failure, errno is set to one of the following values:
EACCES Another process has the file locked.
EBADF stdin is not a valid stream opened for reading.
EINTR A signal interrupted the call.
EIO An input error occurred.
EISDIR The open object is a directory, rather than a file.
ENOMEM Memory could not be allocated for internal buffers.
ENXIO A device error occurred.
EOVERFLOW The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
EWOULDBLOCK The underlying file descriptor is a non-blocking socket and no data is ready to be read.
programming - C - function getchar
programming - javascript - change webpage text on the fly
programming:c:function islower
programming - C - function fputc
programming:c:function isprint
programming - javascript - xml htmp request
programming - pascal - procedure - val
programming - HTML5 - canvas
programming:windows:windows message decoding
programming tools - using gdb
programming - C - function isalpha
programming:c:function rewind
programming - algorithms - graph drawing drawing a scale
programming:c:function isdigit
programming:c:function iscntrl
programming cg - environment variables
filename:programming - C - function getchar
filename:programming%20%2D%20C%20%2D%20function%20getchar
last edit:December 18 2012 19:08:00 (4651 days ago)
ct = 1757737893.000000 = September 13 2025 00:31:33
ft = 1355875680.000000 = December 18 2012 19:08:00
dt = 401862213.000000