1FCLOSE(3S)                                                          FCLOSE(3S)
2
3
4

NAME

6       fclose, fflush - close or flush a stream
7

SYNOPSIS

9       #include <stdio.h>
10
11       fclose(stream)
12       FILE *stream;
13
14       fflush(stream)
15       FILE *stream;
16

DESCRIPTION

18       Fclose  causes  any buffers for the named stream to be emptied, and the
19       file to be closed.  Buffers allocated by the standard input/output sys‐
20       tem are freed.
21
22       Fclose is performed automatically upon calling exit(2).
23
24       Fflush causes any buffered data for the named output stream to be writ‐
25       ten to that file.  The stream remains open.
26

SEE ALSO

28       close(2), fopen(3), setbuf(3)
29

DIAGNOSTICS

31       These routines return EOF if stream is not associated  with  an  output
32       file, or if buffered data cannot be transferred to that file.
33
34
35
36                                                                    FCLOSE(3S)
Impressum