【单选题】【消耗次数:1】
下列条件语句中输出结果与其他语句不同的是。
if(a==0)printf(“%d\n”,y);else printf(“%d\n”,x);
if(a)printf(“%d\n”,x); else printf(“%d\n”,y);
if(a==0)printf(“%d\n”,x);else printf(“%d\n”,y);
if(a!=0)printf(“%d\n”,x);elseprintf(“%d\n”,y);
参考答案:
复制
纠错
相关题目
【单选题】 写出下面程序的执行结果。main( ){ int x,y=1; if(y!=0) printf(“%d\t”,x); if(y= =0) else printf(“%d\t\n”,x);
①  1 3
②  1 5
③  5 3
④  5 5
【单选题】 写出下面程序的执行结果。main( ){ int x,y=1; if(y!=0) printf(“%d\t”,x); if(y= =0) else printf(“%d\t\n”,x);}
①  1 3
②  1 5
③  5 3
④  5 5
【单选题】 执行下面程序后,运行结果是 #includevoid main( ) { int x=41,y=1; if (x%3==0 x%7==0) { y+=x;printf(y=%d\n} else {y=x;printf(y=%d} }
①  y=41
②  y=43
③  y=42
④  y=1
【单选题】 以下程序的运行结果是。main( ){int c,x,y; x=1; y=1; c=0; c=x++||y++; printf(“\n%d%d%d\n”,x,y,c);}
①  110
②  011
③  211
④  001
【单选题】 以下程序的运行结果是。main( ){int c,x,y; x=1; y=1; c=0; c=x++||y++; printf(“\n%d%d%d\n”,x,y,c);}
①  110
②  211
③  011
④  001
【简答题】 以下两条if语句可合并成一条if语句为[填空1]。if(a=b) else if(ab) printf(* * * * y=%d\nelse printf(# # # # x=%d\n
【单选题】 下述程序的运行结果( )。 #includevoid main() { int p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【单选题】 下述程序的运行结果( )。 #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,z;x*=3+2;printf(%d\nx*=y=z=4;printf(%d\nx=y=1;z=x++-1;printf(%d,%d\n,x,z);z+=-x++ +(++y);printf(%d,%d,x,z); }程序的输出结果是[填空1]。
【单选题】 下述程序的运行结果( )。 #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
【单选题】 以下程序的输出结果是(  )。intx=10,y=10;printf(“%d%d\n”,x--,--y)
①  1010
②  99
③  910
④  109
随机题目
【单选题】 Because the police officers phone seemed to be ( ),the witness could not report the case in time.
①  disconnected
②  depressed
③  seperated
④  split
【单选题】 The people had to ( ) a campaign to combat hatred against colored races.
①  launch
②  set
③  settle
④  lash
【单选题】 The husbands ( ) response to the problems in no way helped his marriage.
①  mature
②  young
③  naive
④  juvenile
【单选题】 Each nation need its own noble and ( ) father-figure.
①  popular
②  gentle
③  honourable
④  generous
【单选题】 Evaluation is part of the basic( ) of the project.
①  dynamics
②  dynamism
③  dynamical
④  dynamic
【单选题】 I braced myself for the ( ) blast.
①  evitable
②  inevitably
③  inevitability
④  inevitable
【单选题】 In such an emergency, one has no time to think carefully but to act ( ).
①  exactly
②  precisely
③  hastily
④  instinctively
【单选题】 Did you bring your ( ) from high school?
①  transcription
②  transctiptionist
③  transcipt
④  report
【单选题】 Her expression was ( ) and reminiscent.
①  wishful
②  wistfully
③  wistful
④  wistfulness
【单选题】 The bad weather ( )her spirit more than anything else.
①  lessened
②  strengthed
③  depressed
④  disappointed