1 #include <stdio.h> 2 3 int main(void) 4 { 5 char a[] = "hello"; //字符串以字符串数组的形式保存,末尾加上' ' 6 printf("%d ", sizeof(a)); 7 8 for (int i = 0; i < sizeof(a); i++) 9 { 10 printf("%c", a[i]); 11 } 12 printf("end "); 13 14 return 0; 15 }