strlen()可以得到字符数组中第一个\0前的字符的个数
1 #include <stdio.h> 2 #include <string.h> 3 4 int main(){ 5 char str [10]; 6 gets(str); 7 int len=strlen(str); 8 printf("%d\n",len); 9 return 0; 10 }
strcmp()
strcmp()函数返回两个字符串大小的比较结果,按字典序
原文:https://www.cnblogs.com/Catherinezhilin/p/11135888.html