#include <stdio.h> int ferror(FILE *file);
This function can be used to indicate if the given file has encountered an error or not. See section clearerr.
Nonzero for an error, zero otherwize.
ANSI, POSIX
if (ferror(stdin)) exit(1);
Go to the first, previous, next, last section, table of contents.