单选题 C语言
题号 #2273257

有以下程序:   
#include<stdio.h>
main(  )    
{ int a=1,b=0;
 if(--a)b++;
 else if(a=0)b+=2;
 else b+=3:
 print[("%d\n",b);
}
程序运行后的输出结果是(  )。

进入在线模考

参考答案

D

答案解析

 

你可能感兴趣的试题

A.if(a)printf("%d n",x);  else print[("%d\n",y)
B.if(a=0)pritf("%d n",y);    else print[("%d\n",x)
C.if(a!=0)printf("%d n",x);  else print[("%a\n",y)
D.if(a=0)print[("%d n",x);  else printf("%d\n",y)
A.print[("%c\n",'a'-32);   
B.print[("%d\n",'A');
C.printf("%c\n",65);
D.printf("%c\n",'B'-1);
找试题 · 找答案 · 找资料 在线模考