
9.6.2 Unformatted File I/O Operations
An opened file can be read or written by the following set of unformatted I/O functions:
fget(), get(), fgetchar()
getw(), fputc(), putc()
fputchar(), fputs(), putw()
A brief description of each function has already been provided in Table 9.2.
Let us consider a situation wherein we desire to create a file called “message.dat” containing the
following text:
“When one apple fell, Newton was disturbed;
but when he found that all apples fell;
it was gravitation and he was satisfied”.
The file “message.dat” would be opened with the help of fopen() function and the function
fputs()