【单选题】【消耗次数:1】
#includevoid main() { int n=4; while(n--) printf(%d\n,--n); }
2 0
1 0
2 1
3 0
参考答案:
复制
纠错
相关题目
【单选题】 下述程序的运行结果( )。 #includevoid main() { int n; for(n=1;nn++) { if(n%3==0)continue; printf(%d } }
①  12345678
②  124689
③  12457810
④  1234456
【单选题】 下述程序的运行结果( )。 #includevoid main() { int p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【单选题】 以下程序的运行结果是( )。 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
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=5,b=4,c=3,d=2; if(ac)printf(%d\n else if((c-1=d)==1)printf(%d\n,d+1); else printf(%d\n,d+2); }
①  0
②  1
③  2
④  3
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=5,b=4,c=3,d=2; if(ac)printf(%d\n else if((c-1=d)==1)printf(%d\n,d+1); else printf(%d\n,d+2); }
①  1
②  2
③  3
④  4
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=1,b=2,c=3; if(c=a)printf(%d\n else printf(%d\n }
①  1
②  3
③  5
④  6
【单选题】 下述程序的运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); } case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=1,b=1
②  a=2 ,b=1
③  a=2,b=2
④  a=3,b=3
【单选题】 下述程序的运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=2,b=1
②  a=1,b=2
③  a=0,b=1
④  a=1,b=0
【单选题】 有如下程序: #includevoid main( ) { int a=2,b=-1,c=2; if (ab) if (b0) c=0; else c++; printf(%d\n } 该程序的输出结果是
①  0
②  1
③  2
④  3
【单选题】 以下程序输出结果是( )。 Main() {int x=2,y=-1,z=2; if(xy) if(y0) z=0; else z+=1; printf(%d\n }
①  3
②  2
③  1
④  0
随机题目
【多选题】 Whats __________ , Tom? You dont look well.
①  wrong
②  the matter
③  matter
④  pity
【多选题】 ___________ , in order to make more profit, storekeepers try to supply not only enough goods but also different services for their customers.
①  In short
②  In a word
③  In sum
④  All in all
【多选题】 I am_______________ these exercises.
①  friendly with
②  fought for
③  tired of
④  no longer interested in
【多选题】 A: ________________ get off?B: Get off at the post office.
①  Where should I
②  What should I
③  Can you tell me where to
④  Can you tell me what to
【多选题】 A: Is your grandmother still alive?B:_________
①  She is die.
②  She is dead.
③  She has passed away.
④  She died five years ago.
【单选题】 A nice dictionary_________ to him yesterday.
①  gave
②  has been given
③  was given
④  was giving
【单选题】 I have an appointment_________ 15 minutes.
①  on
②  at
③  for
④  in
【单选题】 My answer is different from yours. I_________ with you.
①  disagree
②  dislike
③  disconnect
④  discover
【单选题】 Should you jog too? If you do, be sure to ask your doctor for_________ .
①  advice
②  bench
③  distance
④  success
【单选题】 Ill finish my adult education courses_________ two years.
①  in
②  on
③  until
④  by