【单选题】执行下列代码后,输出数组中的结果是?
A. 一维数组{6, 3, 5, 7, 9, 1} B. 一维数组{6, 7, 9, 1} C. 一维数组{4, 6, 3, 5, 7, 9, 1} D. 一维数组{4, 7, 9, 1}
A. 一维数组{6, 3, 5, 7, 9, 1} B. 一维数组{6, 7, 9, 1} C. 一维数组{4, 6, 3, 5, 7, 9, 1} D. 一维数组{4, 7, 9, 1}
举一反三
- 若定义以下变量和数组: A: 3 5 7 B: 1 5 9 C: 3 6 9 D: 1 4 7
- 存在多维数组arr,arr =np.array([[1 2 3] [4 5 6] [7 8 9]])数组arr.T的输出为 A: array([[1, 4, 7], [2, 5, 8], [3, 6, 9]]) B: array([[1, 2, 3], [4, 5, 8], [7, 6, 9]]) C: array([[1, 4, 7], [2, 5, 6], [3, 8, 9]]) D: array([[9, 4, 7], [2, 5, 8], [3, 6, 1]])
- 当执行下面的语句定义一维数组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: Dim A(9) As Single = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } B: Dim A( ) As Single = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } C: Dim A( ) As Single = { 1, "abc", "ccc", 4, 5, 6, 7, 8, 9, 10 } D: Dim A( , ) As Single = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
- 【单选题】下面程序段的输出结果是 () 。 int k,a[3][3]={1,2,3,4,5,6,7,8,9}; for (k=0;k<3;k++) printf(“%d”,a[k][2-k]); ( A ) 3 5 7 ( B ) 3 6 9 ( C ) 1 5 9 ( D ) 1 4 7 A. 3 5 7 B. 3 6 9 C. 1 5 9 D. ( A ) 1 4 7