The perror()
function displays the description of the error that corresponds to the error code stored in the system variable errno
.
errno
is a system variable that holds the error code referring to the error condition. A call to a library function produces this error condition.
str:
The pointer to a null-terminated string. This string should contain an explanatory message about the error.The perror()
function shows the output in the following order:
str
errno
Hello
Free Resources