fungetc 1

fungetc

int ungetc(int char, FILE *stream)

Here is what the above code is Doing:
1. It’s opening a file called “test.txt” in read mode.
2. It’s reading the first character from the file.
3. It’s printing the character.
4. It’s ungetting the character.
5. It’s reading the first character again.
6. It’s printing the character.
7. It’s closing the file.

Similar Posts