codescracker
c

C strerror()



« Previous Chapter Next Function »

strerror()

The strerror() function returns a pointer to an implementation-defined string associated with the value of errnum. Under no circumstances should you modify the string.

strerror() Syntax

Following is the syntax of the strerror() function :

#include<string.h>
char *strerror(int errnum);

strerror() Example

Following code fragment prints an implementation-defined error message on the screen :

printf(strerror(10));

C Online Test


« Previous Chapter Next Function »



© Copyright 2021. All Rights Reserved.

CodesCracker