#include int fun (char *str,char *substr) { char *p=str,*r=substr; int n=0; while (*p) { if (*r==*p&&*(r++)==*(p++)) n++; p++; } rerurn n; }