/* Example: Testing if a string is found or not in C language */ #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char s1[] = "hello lautturi world"; char s2[] = "idea"; char* p; p = strstr(s1, s2); if (p) { printf("String found :%s \n",p); } else printf("String not found\n"); return 0; }