1 #define _CRT_SECURE_NO_WARNINGS 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 6 int method() 7 { 8 char *p = "123abcd23sdfwee131abcd12344abcd"; 9 int ncount = 0; 10 11 /*do 12 { 13 p = strstr(p, "abcd"); 14 if (p != NULL) 15 { 16 ncount++; 17 p = p + strlen("abcd"); 18 } 19 else 20 { 21 break; 22 } 23 } while (*p!=' ');*/ 24 25 26 while (p = strstr(p,"abcd")) 27 { 28 ncount++; 29 p = p + strlen("abcd"); 30 if (*p=='