Page 1 of 1

What does the ungetc function return for the following C expression?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
ungetc(c, fp);//where declarations are int c and FILE *fp
a) It returns character c
b) It returns EOF for an error
c) Both returns character c and returns EOF for an error
d) Either returns character c or returns EOF for an error