ExplanationIn the above program the file named "data. txt" is opened in written mode. The
characters are read from the keyboard and stored in variable 1 c'. Using f putc () the characters
are written to a file until '.9(Dot) is pressed.
The same file is closed and then it is re-opened in read mode. On reopening of the file character
pointer sets to the beginning of the file. The contents of the file will be displayed on t
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.