1UNGETC(3S) UNGETC(3S)
2
3
4
6 ungetc - push character back into input stream
7
9 #include <stdio.h>
10
11 ungetc(c, stream)
12 FILE *stream;
13
15 Ungetc pushes the character c back on an input stream. That character
16 will be returned by the next getc call on that stream. Ungetc returns
17 c.
18
19 One character of pushback is guaranteed provided something has been
20 read from the stream and the stream is actually buffered. Attempts to
21 push EOF are rejected.
22
23 Fseek(3S) erases all memory of pushed back characters.
24
26 getc(3S), setbuf(3S), fseek(3S)
27
29 Ungetc returns EOF if it can't push a character back.
30
31
32
337th Edition May 15, 1985 UNGETC(3S)