2.12.7.1 perror

Declaration:

void perror(const char *str);

Prints a descriptive error message to stderr. First the string str is printed followed by a colon then a space. Then an error message based on the current setting of the variable errno is printed.