17.14.2 Setting an error in a FILE stream

A FILE * stream has an error indicator, that can be tested through the ferror function and cleared through the clearerr function. The error indicator is set when an I/O operation on the stream fails. But ISO C and POSIX don’t provide a way to set the error indicator!

The fseterr function sets the error indicator in the given stream.