Contact: aviboots(AT)netvision.net.il
41,379 questions
53,922 answers
573 users
#include <stdio.h> #include <string.h> int main() { char s[64] = "c python c++ java c++ php c++"; char *p = s; while( (p = strstr(p + 1, "c++")) ) { printf("%d ", p - s); } return 0; } /* run: 9 18 26 */