void perror ( const char * string );
Print error message.
Transcribes the the value of the global variable errno into a string and prints that string to stderr (standard error output, generally the screen).
errno describes the last error produced by a call to a library routine. It is an index for the global variable sys_errlist that contains an array of strings describing library routine errors. These error strings do not include the ending newline character (\n). The number of entries is defined by the global variable sys_nerr.
If the parameter string is not NULL, string is printed followed by a colon (:) and the error description.
After the error description a newline character (\n) is appended.
The standard convention is to pass the program name as the string parameter.
perror should be called right after a library routine returns an error or it can be overwritten by further calls.
Defined in ANSI-C.
/* perror example */
FILE * pFile;
perror ("This error has occurred");
If the file unexist.ent doesn't exist something similar to this Output
This error has occurred: No such file or directory
clearerr, strerror, ferror, feof