首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

怎么把getchar()取出的字符放回缓冲区呢?

2013-07-01 
如何把getchar()取出的字符放回缓冲区呢???如题,如何把getchar()取出的字符放回缓冲区呢???[解决办法]有个

如何把getchar()取出的字符放回缓冲区呢???
如题,如何把getchar()取出的字符放回缓冲区呢???
[解决办法]
有个 ungetc 函数
[解决办法]
++

引用:
有个 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.

热点排行