strchr() function :
strchr() function returns pointer to the first occurrence of the character in a given string.

Syntax : char *strchr(const char *str, int character);

Program : In this program, strchr( ) function is used to locate first occurrence of the character ‘i’ in the string ”This is a string ”. Character ‘i’ is located at position 3 and pointer is returned at first occurrence of the character ‘i’.

  
Your score is: