#include #include int main () { const char * haystack = "the quick brown fox jumped over the lazy dog"; const char * needle = "the"; char * s; const char * start; start = haystack; while (s = strstr (start, needle)) { printf ("Found %d characters in.\n", s - haystack); start = s + strlen (needle); } return 0; }