HOLA! talves esto te ayude...
#include<stdio.h>
#include<conio.h>
int buscar(char *base, char *strbuscar);
void main(void){
char *str="hola, soy SysopNecho y digo hola a quien me dice hola";
char *str2="hola";
int nveces=buscar(str,str2);
printf("SysopNecho dijo hola %d veces", nveces);
}
int buscar(char *base, char *strbuscar){
int pos1=0;
int pos2=0;
int cont=0;
while(base[pos1]!='\0'){
if(base[pos1]==strbuscar[pos2]){
pos2++;
if(strbuscar[pos2]=='\0'){
pos2=0;
cont++;
}
}else{
pos2=0;
}
pos1++;
}
return cont;
}