char *p, *r, *a; /**********found**********/ a=Null; while (*s) p=s;r=t; while (*r) /**********found**********/ if (r==p) r++;p++; else break; if (*r==’\0’)a=s; s++;
return a;
main()
char s[100], t[100], *p; printf("\nPlease enter string S:"); scanf(%s",s); printf("\nPlease enter substring t:"); scanf("%s",t); p=fun(s,t); if(p) printf(\nThe result is:%sha",p); else printf("\nNot found !\a");