以下程序的输出结果是prt(int *mi , int in){int ii ;for (ii = 0 ; ii <; in ; ii++)mi[ii]++ ;}# include <;stdio.h>;void main ( ){int ia[ ] = {1, 2, 3, 4, 5} , ii ;prt (ia, 5) ;for (ii = 0 ; ii <; 5 ; ii++)printf ("%d,", ia[ii]) ;}
A: 1,2,3,4,5,
B: 2,3,4,5,6,
C: 3,4,5,6,7,
D: 2,3,4,5,1,
A: 1,2,3,4,5,
B: 2,3,4,5,6,
C: 3,4,5,6,7,
D: 2,3,4,5,1,
举一反三
- 以下程序的输出结果是# include <;stdio.h>;void main ( ){int ia[3][3] , *pi , ii ;pi = ia ;for (ii = 0 ; ii <; 9 ; ii++)pi[ii] = ii ;for (ii = 0 ; ii <; 3 ; ii++)printf ("%d", ia[1][ii]);} A: 0 1 2 B: 2 3 4 C: 1 2 3 D: 3 4 5
- 产生并输出如下形式的方阵。 1 2 2 2 2 2 1 3 1 2 2 2 1 4 3 3 1 2 1 4 4 3 3 3 1 4 4 4 3 3 1 5 1 4 4 3 1 5 5 5 1 4 1 5 5 5 5 5 1 #include "stdio.h" int main() { int a[7][7],i,j; for(i=0;i<7;i++) for(j=0;j<7;j++) if( (1) || i+j==6) a[i][j]=1; else if ( (2) &&i+j<6) a[i][j]=2; else if (i>j&&i+j<6) a[i][j]=3; else if (i i==j ; j==i ii i+j>6; j+i>6; 6
- 已知列表 list1 = [1, 2, 3],那么执行语句[list1.append('ii') for ii in range(1,5,2)]之后,list1的值为________。() A: [1, 2, 3, 'i', 'i'] B: [1, 2, 3, 'ii', 'ii'] C: [1, 2, 3, 1, 3] D: [1, 2, 3, '1', '3']
- 下面错误的语句是( )。 A: int a[2][3] = {1, 2, 3, 4, 5, 6}; B: int a[2][3] = {{1, 2, 3}, {4, 5, 6}}; C: int a[ ][ ] = {{1, 2, 3}, {4, 5, 6}}; D: int a[ ][3] = {{1, 2, 3}, {4, 5, 6}};
- 下列对二维数组的正确定义是( )。 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};