忘了一个c语言的api

一个程序员的修炼之路 2011-10-16 12:53:42

函数实现功能:从输入缓冲区读字符,但不取出来
...全文
67 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
acdbxzyw 2011-10-16
  • 打赏
  • 举报
回复
ungetc();
A character is virtually put back into an input stream at the same position the last character was read and the internal file position indicator is decreased back to that previous position so that this character is returned by the next call to a reading operation on that stream.

char c=getc(stdin);
ungetc(c,stdin);

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧