Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(2)

fopen(3s)

setbuf(3s)

fclose(3s)

NAME

fclose, fflush − close or flush a stream

SYNTAX

#include <stdio.h>

fclose(stream)
FILE *stream;

fflush(stream)
FILE *stream;

DESCRIPTION

The fclose routine causes any buffers for the named stream to be emptied, and the file to be closed.  Buffers allocated by the standard input/output system are freed.  The fclose routine is performed automatically upon calling exit(.).

The fflush routine causes any buffered data for the named output stream to be written to that file.  The stream remains open. 

DIAGNOSTICS

These routines return EOF if stream is not associated with an output file, or if buffered data cannot be transferred to that file. 

SEE ALSO

close(2), fopen(3s), setbuf(3s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026