1.查找一个字符在另一个字符串中第一次出现的下标
1 #include<stdio.h> 2 #include<string.h> 3 4 int T1(const char* str,char c); 5 6 int main() 7 { 8 printf("%d ",T1("abcd",'c')); 9 printf("%d ",T1("abcd",'e')); 10 11 return 0; 12 } 13 14 int T1(const char* str,char c) 15 { 16 int Index = 0; 17 18 while(*str != '