【单选题】【消耗次数:1】
以下程序的输出结果是()。 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
参考答案:
复制
纠错
相关题目
【单选题】 若定义数组并初始化,运行的结果是() 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
④  无法运行
【单选题】 以下程序段的运行结果是()。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
【单选题】 以下程序的运行结果是( )。 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( ) { char a[]=morning,t; int i,j=0; for(i=1;i if(a[j]j=i; t=a[j]; a[j]=a[7]; a[7]=a[j]; puts(a); }
①  mogninr
②  mo
③  morning
④  mornin
【单选题】 以下程序段运行后s的值是()。 int a[3][3]={1, 2, 3, 4, 5, 1, 2, 3, 4} ; int i, j, s=1; for(i=0; i for(j=i+1; j s+=a[i][j];
①  6
②  120
③  7
④  240
【单选题】 有以下程序,执行后输出结果是() 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
【简答题】 下列程序段的运行结果是[填空] 。 Private Sub Form_Click() Dim a(3) As Long a(0) = 1: a(1) = 2: a(2) = 3: a(3) = 4 j = 1 For i = 3 To 0 Step -1 s = s + a(i) * j j = j * 10 Next i Print s End Sub
【单选题】 以下循环体的执行次数是#include stdio.hvoid main(){ int i,j; for(i=0,j=1; i i=i+2) j--; }
①  3
②  2
③  1
④  0
【单选题】 以下程序段运行后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
【单选题】 有以下程序,程序运行以后的输出结果是() #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
随机题目
【单选题】 20. Sometimes we might see a person’s _____world from his behavior.
①  inside
②  inner
③  in
④  within
【单选题】 1.The authors purpose of writing
①  To show the authors grandparents were honest.
②  To explain what Integrity Triad realy embodies.
③  To demonstrate the authors grandparents motto
【单选题】 23.The customer expressed her ___for that broad hat.
①  disapproval 
②  distaste  
③  dissatisfaction 
④  dismay
【单选题】 11.The United Nations managed to ______millions of people from hunger last year.
①  preserve
②  sell
③  save
④  . buy
【单选题】 3. He had to ______ his past actions when he retired, or he would be punished.
①  consider
②  account for
③  think
④  popular
【单选题】 19. The American people _____ a president every four years.
①  choose
②  elect
③  pick
④  select
【单选题】 22.___ him tomorrow?
①  Why not to call on 
②  Why don’t call on  
③  Why not calling on 
④  Why not call on
【单选题】 13. Do you know ______ who would be interested in this topic?.
①  someone
②  no one
③  anyone
④  everyone
【单选题】 23. As everyone knows, warm ______ is comfortable in winter.
①  clothes
②  clothings
③  cloth
④  clothing
【单选题】 26. There is no doubt that she can produce work that is equal ________ anyone else’s in her class.
①  to
②  in
③  for
④  with