定义:int i;int x[4][4]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};,则语句for(i=0;i<4;i++) printf("%3d",x[i][3-i]);的输出是[/i]
A: 1 5 9 13
B: 1 6 11 16
C: 4 7 10 13
D: 4 8 12 16
A: 1 5 9 13
B: 1 6 11 16
C: 4 7 10 13
D: 4 8 12 16
举一反三
- 定义如下变量和数组int i;int x[4][4]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};则下面语句的输出结果是:for(i=0;i<4;i++) printf("%3d",x[i][3-i]);[/i] A: 1 5 9 13 B: 1 6 11 16 C: 4 7 10 13 D: 4 8 12 16
- 阅读下面程序: int i; int x[4][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; for (i = 0; i<4; i++) printf("%3d", x[i][3 - i]); 下列选项中哪一项是正确的输出结果( )[/i]
- 阅读下面程序: int i; int x[4][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; for (i = 0; i<4; i++) printf("%3d", x[i][3 - i]); 下列选项中哪一项是正确的输出结果
- 输出以下4*5的矩阵。 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 #include int main() { int i,j,n=0; for(i=1;i<=4;i++) for(j=1; (1) ; j++, (2) ) { if( (3) ) printf(" "); printf("%d ",i*j); } printf(" "); return 0; }
- 【单选题】myarray1=np.arange(15) myarray2=myarray1.reshape(5,3) print( myarray1) print(myarray2) 输出值是? A. [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15] [[ 0 1 2] [ 3 4 5] [ 6 7 8] [ 9 10 11] [12 13 14]] B. [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15] [[ 1 2 3] [ 4 5 6] [ 7 8 9] [10 11 12] [13 14 15]] C. [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14] [[ 0 1 2] [ 3 4 5] [ 6 7 8] [ 9 10 11] [12 13 14]] D. [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14] [[ 1 2 3] [ 4 5 6] [ 7 8 9] [10 11 12] [13 14 15]]