#include "stdio.h"
#include "string.h"
int subString(const char *p,const char *psub){
int n;
char *ptmp;
for(n=0;*p;p++)
if(ptmp=strstr(p,psub)){
n++;
p=ptmp;
}
return n;
}
void main(void){
char a[200],b[100];
printf("Enter a string(ln<200)...\nstr1=");
gets(a);
printf("Type a subString(ln<100)...\nstr2=");
gets(b);
printf("There is(are) %d.\n",subString(a,b));
}