Hàm đếm một kí tự xuất hiện bao nhiêu lần trong chuỗi

int diemtu(char *a,char *b)
{
int d=0;
while(strstr(a,b)!=NULL)
{
d++;
a=strstr(a,b)+1;

}

return d;
}

Share this

Related Posts

Previous
Next Post »