#include "stdio.h"
#include "string.h"
#include <stdlib.h>
// Count the number of times the specified string abcd appears in the string
int main(int argc, char *argv[])
{
char *p = "abcd1234abcd54a655abcd333af33";
int ncount = 0;
do
{
p = strstr (p, "a" ); // find the first occurrence of the specified string abcd in the string
if (p == NULL)
{
break;
}
else
{
ncount++;
p = p + strlen("abcd");
}
}while(*p != '\0');
printf("ncout:%d\n", ncount);
return0;
}