Opening files
You can use the library functions
fopen()
or
freopen()
to open a file.
Using fopen() and freopen()
Buffering
Parent topic:
Performing terminal I/O operations