以下对二维数组的定义中正确的是
A: inta[4][]={1,3,2,4,5,6};
B: inta[][4];
C: inta[][3]={1,5,6,3,7,8,2,0};
D: inta[][]={{1,2,3},{4,5,6}};
A: inta[4][]={1,3,2,4,5,6};
B: inta[][4];
C: inta[][3]={1,5,6,3,7,8,2,0};
D: inta[][]={{1,2,3},{4,5,6}};
举一反三
- 以下不能对二维数组a进行正确初始化的语句是() A: inta[2][3]={{1,2,3},{4,5,6}}; B: inta[][3]={{1,2,3},{1,2,3}}; C: inta[2][4]={{1,2,3},{4,5},{6}}; D: inta[3][3]={{1,2,3},{4,5,6},{7,8,9}}
- 以下能对二维数组a正确初始化的语句是() A: inta[2][]={{1,0,1},{5,2,3}}; B: inta[][3]={{1,2,3},{4,5,6}}; C: inta[2][4]={{1,2,3},{4,5},{6}}; D: inta[][3]={{1,0,1},{},{1,1}};
- 以下能对二维数组进行正确初始化的语句是() A: inta[1][3]={{1,0,1},{},{1,2,3}}; B: inta[2][4]={{1},{2,3},{4,5,6}}; C: inta[][3]={{1,2},{3,4}}; D: inta[3][]={{1},{2,3},{4,5,6}};
- 当执行下面的语句定义一维数组a后,此数组的所有元素为 ( ) inta[10]; A.a[1],a[2],a[3],a[4],a[5],a[6],a[8],a[9],a[10],a[10] B.a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9] C.a[0],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10] D.a[1],a[2],a [3],a[4],a [5],a [9],a [7],a [8],a [9],a [10],a [11]
- 下列对二维数组的正确定义是( )。 A: int a[2, 3] = {1, 2, 3, 4, 5, 6}; B: int a[][] = {1, 2 , 3, 4, 5, 6}; C: int a[2][] = {1, 2, 3, 4, 5, 6}; D: int a[][3] = {1, 2, 3, 4, 5, 6};