Determine the error status of an open file descriptor
Integer_Type ferror (File_Type fp)
This function may be used to determine the state of the error indicator of the open file descriptor fp. It returns 0 if the indicator is not set, or non-zero if it is. The error indicator may be cleared by the clearerr function.