【单选题】【消耗次数:1】
有以下程序#includestdio.hmain(){ int a=1,b=0;if(--a) else if(a==0) b+=2;else b+=3;printf(“%d\n”,b); }程序运行后的输出结果是。
0
1
2
3
参考答案:
复制
纠错
相关题目
【单选题】 有以下程序#includestdio.hmain(){ int a=1,b=0;if(--a) else if(a==0) b+=2;else b+=3;printf(“%d\n”,b); }程序运行后的输出结果是(  )。
①  0
②  1
③  2
④  3
【单选题】 有如下程序: #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 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
【单选题】 下述程序的运行结果( )。 #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 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
【单选题】 以下程序输出结果是( )。 Main() {int x=2,y=-1,z=2; if(xy) if(y0) z=0; else z+=1; printf(%d\n }
①  3
②  2
③  1
④  0
【单选题】 下述程序的运行结果( )。 #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=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
【单选题】 有如下程序:main(){  intx=1,a=0,b=0;  switch(x){  case0:b++;case1:a++;case2:a++;b++;}  printf(“a=%d,b=%d\n”,a,b);}该程序的输出结果是()
①  a=2 b=1
②  a=1 b=1
③  a=1 b=0
④  a=2 b=2
随机题目
【单选题】 下列类别词语中词义具有模糊性的词语是()
①  四季名称
②  器物名称
③  数字
④  度量单位
【单选题】 汉语“伯母、婶娘、姑母、姨母、舅母”在英语中统称为“aunt”,这种现象反映了语义的()
①  系统性
②  灵活性
③  民族性
④  模糊性
【单选题】 下列词语属于半音译半意译词的是()
①  扑克
②  逻辑
③  香槟酒
④  芭蕾
【单选题】 下列词中全是重叠构词的是()
①  爸爸、白白、常常、干干净净
②  姐姐、跌跌撞撞、皑皑、星星
③  大大方方、高高兴兴、刚刚、姥姥
④  渐渐、仅仅、猩猩、爷爷
【单选题】 “桌子我都擦干净了”中的“擦”,受事为()
①  桌子
② 
③  干净
④ 
【单选题】 下列词中义项含有色彩义的是()
①  钱包
②  壁垒
③  裤子
④  高峰
【单选题】 下列词中具有[+同胞][+女性][+年长]义素的词是()
①  伯父
②  弟弟
③  哥哥
④  姐姐
【单选题】 下列语言单位属于“惯用语”的是()
① 
②  守株待兔
③  敲竹杠
④  情人眼里出西施
【单选题】 下列单位中不属于音义结合的单位是()
① 
②  语素
③  义素
④  词组
【单选题】 下列词中具有[+用于照明][-用电]义素的词是()
①  壁灯
②  吊灯
③  路灯
④  油灯