\\ 字符与字符串的长度不一样
#include <stdio.h>
#include <string.h>
int main()
{
char arr1[]="abc";
char arr2[]={'a','b','c'};\\直到遇到'\0'
printf("%d\n",strlen(arr1));
printf("%d\n",strlen(arr2));
return 0;
}\\strlen--string length
2023-10-09 14:18:04
\\ 字符与字符串的长度不一样
#include <stdio.h>
#include <string.h>
int main()
{
char arr1[]="abc";
char arr2[]={'a','b','c'};\\直到遇到'\0'
printf("%d\n",strlen(arr1));
printf("%d\n",strlen(arr2));
return 0;
}\\strlen--string length