strerror


Character string conversion of error number

[Classification]

Standard library

[Syntax]

#include <string.h>

char *strerror(int errnum);

[Return value]

Returns a pointer to the converted character string.

[Description]

This function converts error number errnum into a character string. The value of errnum is usually the duplication of global variable errno. Do not change the specified array of the application program.

The message that is output is as follows.

When errno is EDOM

"EDOM error"

When errno is ERANGE

"ERANGE error"

When errno is 0

"no error"

Otherwise

"error xxx" (xxx is abs (errno) % 1000)