以下对于二维数组初始化正确的是( )。
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[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[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进行正确初始化的是() A: int a[3][4]={1}; B: int a[][4]={{1,2},{3}}; C: int a[2][5]={{1,2},{3,4},{5,6}}; D: int a[][2]={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}};
- 【二维数组,初始化】以下能对二维数组a进行正确初始化的语句是【】 A: int a[2][ ]={{1, 0, 1}, {5, 2, 3}}; B: int a[ ][3]={{1, 2, 3}, {4, 5, 6}}; C: int a[2][4]={{1, 2, 3}, {4, 5}, {6}}; D: int a[ ][3]={{1, 0, 1}, {}, {1, 1}};