char a[5]=”china’’;/*是非法的,没有元素存放’\0’*/
(2)注意区别以下几种定义方式
1)char a[]=”abcd”;
a
b
c
d
\0
数组a共有5个元素,正确存放了字符串“abcd”。
2)char a[]={’a’,’b’,’c’,’d’};
数组