strlen的作用:检测字符串的实际长度
eg: char arr[20]=“hello”;
int a=strlen(arr);
那么此时a=5
strcat的作用:把两个字符串拼接在一起
eg: char arr1[20]=“hello”;
char arrr2[20]=“world”;
char arr3[20]= strcat(arr1,arr2);
那么此时的arr3就是helloworld
#include <stdio.h>
#include <string.h>
int main()
{
char arr[20] = "hello";
int ret = strlen(strcat(arr, "world"));
printf("%d\n", ret);
return 0;
}