#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h>

int main() { char arr1[] = "abc"; char arr2[] = { 'a', 'b', 'c','\0' };//一段数组的结束标志是\0 printf("%d\n", strlen(arr1)); printf("%d\n", strlen(arr2));

return 0;

}

//对数组的学习,对数组长度的打印