#include #include int main() { char where[] = "Quand on n'a pas de tete, il faut avoir des jambes."; char what1[] = "il"; char what2[] = "te"; char *res; // strstr function returns a pointer to the FIRST occurrence of // the second string in the first string, or a NULL pointer if // the second string is not present. res = strstr(where, what1); if (res != NULL) printf("%s\n", res); else printf("%s NOT FOUND.\n", what1); res = strstr(where, what2); if (res != NULL) printf("%s\n", res); else printf("%s NOT FOUND.\n", what2); return 0; } /** Output: * il faut avoir des jambes. * tete, il faut avoir des jambes. */