int fclose (stream)
int fflush (stream)
fclose is performed automatically upon calling exit(2P).
fflush causes any buffered data for the named output stream to be written to that file. It does not update the i-node that describes the file. The stream remains open.
These functions return 0 for success, and EOF if any errors were detected.