1GETCHAR(P)                 POSIX Programmer's Manual                GETCHAR(P)
2
3
4

NAME

6       getchar - get a byte from a stdin stream
7

SYNOPSIS

9       #include <stdio.h>
10
11       int getchar(void);
12
13

DESCRIPTION

15       The getchar() function shall be equivalent to getc(stdin).
16

RETURN VALUE

18       Refer to fgetc() .
19

ERRORS

21       Refer to fgetc() .
22
23       The following sections are informative.
24

EXAMPLES

26       None.
27

APPLICATION USAGE

29       If the integer value returned by getchar() is stored into a variable of
30       type char and then compared against the integer constant EOF, the  com‐
31       parison may never succeed, because sign-extension of a variable of type
32       char on widening to integer is implementation-defined.
33

RATIONALE

35       None.
36

FUTURE DIRECTIONS

38       None.
39

SEE ALSO

41       getc() , the Base Definitions volume of IEEE Std 1003.1-2001, <stdio.h>
42
44       Portions of this text are reprinted and reproduced in  electronic  form
45       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
46       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
47       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
48       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
49       event of any discrepancy between this version and the original IEEE and
50       The Open Group Standard, the original IEEE and The Open Group  Standard
51       is  the  referee document. The original Standard can be obtained online
52       at http://www.opengroup.org/unix/online.html .
53
54
55
56IEEE/The Open Group                  2003                           GETCHAR(P)
Impressum