- strstr():寻找字符串,找到,返回其内存地址,未找到,返回0(假)
例:
strstr("dysfunctional","fun")
例:
char s0[] = "dysfunctional";
char s1[] = "fun";
if(strstr(s0,s1))
puts("I found the fun in dysfunctional!");
-
代码的书写顺序:
- 头文件:代码的最前面,以便编译器能够正确的调用函数
- 声明全局变量
- 其他函数
- 主函数
-
二维数组的写法(数组的数组):strings[…][…]