totn C Functions

C Language: feof function
(Test for End-of-File)

In the C Programming Language, the feof function tests to see if the end-of-file indicator has been set for a stream pointed to by stream.

Syntax

The syntax for the feof function in the C Language is:

int feof(FILE *stream);

Parameters or Arguments

stream
The stream whose end-of-file indicator is to be tested.

Returns

The feof function returns a nonzero value if the end-of-file indicator is set. Otherwise, it returns zero.

Required Header

In the C Language, the required header for the feof function is:

#include <stdio.h>

Applies To

In the C Language, the feof function can be used in the following versions:

  • ANSI/ISO 9899-1990

Similar Functions

Other C functions that are similar to the feof function:

See Also

Other C functions that are noteworthy when dealing with the feof function: