如何把getchar()取出的字符放回缓冲区呢???
如题,如何把getchar()取出的字符放回缓冲区呢???
[解决办法]
有个 ungetc 函数
[解决办法]
++
[解决办法]
int ungetc(int c, FILE *stream)
ungetc pushes c (converted to an unsigned char) back onto stream, where it will be returned on the next read. Only one character of pushback per stream is guaranteed. EOF may not be pushed back. ungetc returns the character pushed back, or EOF for error.