【单选题】【消耗次数:1】
执行如下程序代码   a=0;c=0;   do{   --c;   a=a-1;   }while(a>0);   后,c的值是( )
0
1
-1
死循环
参考答案:
复制
纠错
相关题目
【单选题】 有如下程序: #includevoid main( ) { int a=2,b=-1,c=2; if (ab) if (b0) c=0; else c++; printf(%d\n } 该程序的输出结果是
①  0
②  1
③  2
④  3
【简答题】 下面程序段的运行结果是[填空1]。char c[5]={a,b,\0,c,\0};printf(%s,c);
【单选题】 指令ADDC A,@R0 执行前(A)=38H,(R0)=30H,(30H)=FOH,(C)=1 执行后,其结果为( )。
①  (A)=92H (C)=1
②  (A)=92H (C)=0
③  (A)=8CH (C)=1
④  (A)=8CH (C)=0
【单选题】 1. 对下面程序段描述正确的是int x=0,s=0; while (x!=0) s=s+x+1;printf(%d
①  运行程序段后输出0
②  运行程序段后输出1
③  程序段中的控制表达式是非法的
④  程序段循环无数次
【单选题】 若变量已正确定义,和语句“if(a>b)k=0;else k=1;”等价的是()
①  k=(a;b)?1:0;
②  k=a;b;
③  k=a;=b;
④  a;=b?0:1;
【单选题】 指令ADD A,R0 执行前(A)=38H,(R0)=54H,(C)=1 执行后,其结果为( )。
①  (A)=86H
②  (A)=20H
③  (A)=18H
④  (A)=00H
【单选题】 若a的值为3时,下列程序段被执行后,c的值是多少?( ) if ( a>0 ) if ( a>3 ) c = 2; else c = 3; else c = 4;
①  1
②  2
③  3
④  4
【单选题】 设有说明intx=0,y=2;则执行if(x=0)y=1+x;elsey=x-1;后,变量y的值是(   )
①  -1
②  0
③  1
④  2
【单选题】 假定所有变量均已正确说明,下列程序段运行后x的值是。a=b=c=0;x=35;if(!a) x=-1;else if(b);if(c) else
①  35
②  34
③  4
④  3
【单选题】 假定所有变量均已正确说明,下列程序段运行后x的值是。a=b=c=0;x=35;if(!a) x=-1;else if(b);if(c) else
①  34
②  4
③  35
④  3
随机题目
【单选题】 称是来自总体的一个简单随机样本(简称样本),即满足()
①  相互独立,不一定同分布
②  相互独立同分布,但与总体分布不一定相同
③  相互独立且均与总体同分布
④  与总体同分布,但不一定相互独立
【单选题】 设为相互独立的随机变量,且,则分别为()
①  5,7
②  5,25
③  5,5
④  6,5
【单选题】 总体均值的区间估计中,下面说法中,正确的是()
①  置信度一定时,样本容量增加,则置信区间的长度变长
②  置信度一定时,样本容量增加,则置信区间的长度变短
③  置信度变小,则置信区间的长度变短
④  置信度变大,则置信区间的长度变短
【单选题】 Itriedtoput____atelephonecalltohim,buthislineisalwaysbusy.
①  over
②  into
③  away
④  through
【单选题】 ---Excuseme.HowdoIgettoPorterStreetfromhere?---__________.You’dbetterasksomeoneelse.
①  Well,it’snottoofaraway.
②  Doyouaskme?
③  I’mnotfromaroundhere.
④  Pleasedtomeetyou.
【单选题】 Isuddenlyrealizedthathewastryingto_____quarrellingwithme
①  consider
②  enjoy
③  avoid
④  prevent
【单选题】 Withthe___________ofJohn,everyonepassedtheexam.
①  except
②  excess
③  exception
④  excellence
【单选题】 Therewaslittlehope____propermedicinecouldbefound.
①  if
②  ifnot
③  with
④  unless
【单选题】 Nancyis______________________girl.
①  aeighteen-year-old
②  aneighteen-yearsold
③  aeighteenyears-old
④  aneighteen-year-old
【单选题】 Abus____whenIwassittingonthebench.
①  passedby
②  passedon
③  passedup
④  passedout