以下创建数组的代码正确的是:
A: int A[3][2] = {{1,2},{2,3},{3,4,5}};
B: int A[][] = {{1,2},{2,3},{3,4,5}};
C: int A[][2] = {{1,2},{2,3},{4,5}};
D: int A[3][] = {{1,2},{2,3},{3,4,5}};
A: int A[3][2] = {{1,2},{2,3},{3,4,5}};
B: int A[][] = {{1,2},{2,3},{3,4,5}};
C: int A[][2] = {{1,2},{2,3},{4,5}};
D: int A[3][] = {{1,2},{2,3},{3,4,5}};
举一反三
- 以下对于二维数组初始化正确的是( )。 A: int[3][] num = {{1,2}, {2}, {3,4,5}}; B: int[3][3] num = {{1,2}, {2}, {3,4,5}}; C: int[][3] num = {{1,2}, {2}, {3,4,5}}; D: int[][] num = {{1,2}, {2}, {3,4,5}};
- 下列二维数组定义中正确的是 A: int A[2][]={1,2}; B: int A[2]={1,2}; C: int a[2][]={{1,2},{2,3}}; D: int a[2][3]={{1,2}, ,{2,3}};
- 下列对二维数组的正确定义是( )。 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};
- 以下对二维数组进行正确初始化的是( )。 (1.0) A: int a[2][3] = {{1, 2}, {3, 4}, {5, 6; B: int a[][3] = {1, 2, 3, 4, 5, 6}; C: int a[2][] = {1, 2, 3, 4, 5, 6}; D: int a[2][] = {{1, 2}, {3, 4;
- 以下对二维数组a初始化正确的语句是_。 A: int a[2][ ]={{0 , 1 , 2}, {3 , 4 , 5}}; B: int a[ ][3]={{0, 1, 2}, {3, 4, 5}}; C: int a[2][4]={{0, 1 , 2}, {3 , 4}, {5}} D: int a[ ][3]={{0, 1, 2}, { }, {3, 4}};