PTA第六章错题

1-4
If there are fewer initializers than the number of elements in the array, C automatically initializes the remaining elements to the last value of the list of initializers.
F

1-5
It’s an error if an initializer list contains more initializers than there are elements in the array.
T

1-8
数组定义后,数组名表示该数组所分配连续内存空间中第一个单元的地址,即首地址。T

1-12
若有定义int a[]={2,4,6,8,10},a[1]和a++表示的含义相同。F
a++在没有运算的时候是a[0]。

1-13
For initializing a 2-dimension array, if the initializers are complete, the initialization statement could be as following:

int a[][]={ {1,2,3,4},{5,6,7,8}};
F,列数不能省

2-11
若有定义int a[2][3]; 则对数组元素的非法引用是(D )。
(2分)
A.a[0][1/2]
B.a[1][1]
C.a[4-4][0]
D.a[0][3]
不会有3

猜你喜欢

转载自blog.csdn.net/CSDN_YJX/article/details/113587241