Function ferror

Top 

Declaration:

int ferror(unsigned long stream);

Description

Detects errors on stream.

ferror tests the given stream for a read or write error. If the stream's error indicator is set, it will remain set until clearerr or rewind is called or until the stream is closed.

Returned value

ferror will return nonzero, if an error is detected on the specified stream.