#include "stdAfx.h" #include "ctype.h" #include "stdlib.h" #include "string.h" int main() { int z; int ret(char a[],char b[]); char num1[41]="woshiyigedashabi"; char num2[41]="shi"; z=ret(num2,num1); if(z!=0) printf("%c\n",num2[0]); else return NULL; system("pause"); return 0; } int ret(char a[],char b[]) { int i=0,j,z=0,q; while(b[i]!='\0') { if(a[0]==b[i]) { for(j=i;j<strlen(a);j++) { if(a[z]!=b[j]) { q=0; break; } else q=1; z++; } if(q==0) return 0; else return 1; } i++; } }