#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
char arr1[] = "abc";//"abc"-'a','b','c','\0'
char arr2[] = { 'a','b','c','\0' };
printf("%s\n",arr1);//%s打印字符串类型
printf("%s\n",arr2);
printf("%d\n",strlen(arr1));//strlen-string length-计算字符串长度
printf("%d\n",strlen(arr2));
return 0;
}
字符串(长度)
最新推荐文章于 2024-11-11 23:32:39 发布