【单选题】【消耗次数:1】
以下程序的运行结果是()。intfun(inta[4][4]){inti;for(i=0;ii++)printf("%2d",a[i][2]);printf("\n");}main(){inta[4][4]={1,1,2,2,1,9,0,0,2,4,0,0,0,5,9,8};fun(a);}
1905
2000
2008
2009
参考答案:
复制
纠错
相关题目
【单选题】 以下程序的运行结果是( )。 void fun(int array[3][3]) { int j; for(j=0;jj++) array[1][j]=array[1][j]++; printf(\n} void main(){ int j,a[3][3]={0,1,2,1,0,4,2,4,5};fun(a);for(j=0;jj++)printf(%d,a[1][j]); printf(\n }
①  1 0 4
②  2 1 5
③  0 1 2
④  1 2 3
【单选题】 有以下程序,程序运行以后的输出结果是() #include stdio.h main( ) { int a[ ]={2,3,5,4},i; for(i=0;i switch(i%2) { case 0:switch(a[i]%2) {case 0:a[i]++;break; case 1:a[i]--; }break; case 1:a[i]=0; } for(i=0;i printf(\n); }
①  3 3 4 4
②  2 0 5 0
③  3 0 4 0
④  0 3 0 4
【单选题】 以下程序段的运行结果是()。inta[]={1,2,3,4},i,j;j=1;for(i=3;ii--){a[i]=a[i]*j;j=j*3;}for(i=0;ii++)printf("%d",a[i]);
①  36912
②  181294
③  271894
④  541894
【单选题】 下面程序执行后的结果是() #include stdio.h void fun( ) { int i,sum=0; int a[5]={1,2,3,4,5}; for (i=0;i { if (a[i]%2==0) { sum+=a[i]; } } printf(%d,sum); } void main( ) { fun( ); }
①  6
②  15
③  9
④  11
【单选题】 以下程序的运行结果是()。main(){inta[3]={1,2,3};int*num[3];int**p,i;for(i=0;ii++)num[i]=p=num;printf("%d",**p);}
①  1
②  3
③  a[0]
④  num
【单选题】 有以下程序,执行后输出结果是() main( ) { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i { printf(%d ,m[k][i]); } }
①  4 5 6
②  2 5 8
③  3 6 9
④  7 8 9
【单选题】 以下程序段运行后s的值是()。inta[3][3]={1,2,3,4,5,1,2,3,4};inti,j,s=1;for(i=0;ii++)for(j=i+1;jj++)s+=a[i][j];
①  6
②  120
③  7
④  240
【单选题】 以下程序的输出结果是()。 main( ) { int b[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=0; for(i=0;i for(j=i;j t=t+b[i][b[j][j]]; printf(%d\n,t); }
①  3
②  4
③  1
④  9
【单选题】 以下程序段运行后x的值为()。inta[8]={1,2,3,4,5,6,7,8},i,x=0;for(i=0;ii++,i++)x=x+a[i];
①  36
②  16
③  20
④  18
【单选题】 若定义数组并初始化,运行的结果是() void main( ) { int i,j,a[2][3]={{1,2,3},{4,5,6}}; for(i=0;i for(j=0;j printf(%d,a[i][j]); }
①  1,2,3,4,5,6
②  12345
③  123456
④  无法运行
随机题目
【单选题】 I ___remember to send my mother some flowers. Its her birthday tomorrow.
①  must
②  have to
③  could
【单选题】 Ihaven got___to do this evening. Would you like to go to see a film?
①  something
②  anything
③  nothing
【单选题】 -“When shall we meet again next week?”-“______________ day is possible. It’s no problem with me.”
①  Either
②  Neither
③  Every
④  Any
【单选题】 _____ ! That fire is dangerous.
①  To stop
②  Stop
③  Stopping
④  Stopped
【单选题】 His grandfather is very healthy. He _______drinks _______smokes.
①  both, and
②  no,but
③  either, or
④  neither, nor
【单选题】 We havent seen such a beautiful film ______.
①  since four years
②  for the past four years
③  four years ago
④  from the past four years
【单选题】 Get up! Mary. Tom has _____called you three times this morning.
①  yet
②  already
③  never
④  seldom
【单选题】 Mr. Hilton is not good at music. Neither ______his children.
①  is
②  was
③  were
④  are
【单选题】 Im really looking forward to _____from you.
①  hear
②  hearing
③  hears
④  to hear
【单选题】 They stopped ___ when it rained.
①  playing
②  to play
③  played