FCLOSE(3S) — System Interface Manual — Standard I/O Library
NAME
fclose, fflush − close or flush a stream
SYNOPSIS
#include <stdio.h>
fclose(stream)
FILE ∗stream;
fflush(stream)
FILE ∗stream;
DESCRIPTION
Fclose empties any buffers for the named stream and closes the file associated with that stream. Buffers allocated by the standard input/output system are freed. Fclose is performed automatically upon calling exit(3).
Fflush writes any buffered data for the named output stream to its associated file. The stream remains open.
SEE ALSO
DIAGNOSTICS
These routines return EOF if stream is not associated with an output file, or if buffered data cannot be transferred to that file.
Sun System Release 0.3 — 26 April 1983