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

Syntax : char *strstr(const char *str1, const char *str2);

Program : In this program, strstr( ) function is used to locate first occurrence of the string “test” in the string ”This is a test string for testing”. Pointer is returned at first occurrence of the string “test”.

  
Your score is: