ungetc()函数

ungetc函数是将输出流中的废弃数据退入流中去。

MSDN是这样定义的

int ungetc(
   int c,
      FILE *stream 
);
Parameters
c Character to be pushed.
stream Pointer to FILE structure.
Return Value
If successful, each of these functions returns the character argument c. If c cannot be pushed back or if no character has been read, the input stream is unchanged and ungetc returns EOF; ungetwc returns WEOF. If stream is NULL, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue,EOF or WEOF is returned and errno is set to EINVAL.

回退字符

你可能感兴趣的:(ungetc()函数)