1 #include"stdio.h" 2 #include"string.h" 3 main() 4 { 5 char a[100]; 6 char b[100]; 7 char subString[100]; 8 int j; 9 printf("请输入字符串A:"); 10 scanf("%s",a);11 printf("字符串A:%s\n",a);12 for(int i =0; i<=strlen(a); i++)13 {14 b[i] = a[i]; 15 } 16 printf("字符串B:%s\n",b);17 printf("请输入需要查找的子串:");18 scanf("%s",subString); 19 for(int i =0; i