@node ferror, stdio @subheading Syntax @example #include int ferror(FILE *file); @end example @subheading Description This function can be used to indicate if the given @var{file} has encountered an error or not. @xref{clearerr}. @subheading Return Value Nonzero for an error, zero otherwize. @subheading Portability @portability ansi, posix @subheading Example @example if (ferror(stdin)) exit(1); @end example