The strstr function returns a pointer to the first occurrence of string s2 in string s1. The function returns the null pointer if the string is not found. The process of matching does not include the terminating null-characters(‘\0’). Syntax of strstr in C:   char *strstr(const char *s1, const char…