【单选题】【消耗次数:1】
以下程序运行的结果是)main){intx=12,y;y=x>12?x+10:x-12;printf“y=%d\n”,y);}
y=0
y=22
y=12
y=10
参考答案:
复制
纠错
相关题目
【单选题】 若运行时给变量x输入12,则以下程序的运行结果是:main){intx,y;scanf%d,y=x>12?x+10:x12;printf%d\n,y)}
①  0
②  22
③  120)10
【单选题】 若运行时给变量x输入12,则以下程序的运行结果是( )。 Main() {int scanf(%d, y=x12?x+10:x-12; printf(%d\n }
①  0
②  22
③  12
④  10
【单选题】 以下程序段的运行结果是( )。 for(y=1;y) y=((x=3*y,x+1),x-1); printf(x=%d,y=%d,x,y);
①  x=27,y=27
②  x=12,y=13
③  x=15,y=14
④  x=y=27
【单选题】 执行下面程序后,运行结果是 #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
【单选题】 以下程序的输出结果是(  )。intx=10,y=10;printf(“%d%d\n”,x--,--y)
①  1010
②  99
③  910
④  109
【单选题】 以下程序的运行结果是。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
【单选题】 写出下面程序的执行结果。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
【简答题】 设 A={1, 2, 4, 6}, 分别求关系 R={|x, y∈Aùx+y12}、{|x, y∈Aù|x-y|=1}、{|x, y∈Aùx/y∈A}和{|x, y∈Aùy 为素数}。
随机题目
【单选题】 A country ________ birth rate is higher than its death rate will have an increasing population.
①  who
②  which
③  whose
④  where
【单选题】 Younevertoldmeyouhaveseenthefilm,________?
①  hadyou
②  didn’tyou
③  didyou
④  weren’tyou
【单选题】 The school was named ________ the hero who gave his life for the cause of the liberation.
①  for
②  with
③  after
④  about
【单选题】 Youdon’thavetobeinsuchahurry,Iwouldratheryou________onbusinessfirst.
①  wouldgo
②  willgo
③  went
④  havegone
【单选题】 Do what you think is right, ________ they say.
①  whatever
②  however
③  whenever
④  whichever
【单选题】 It suddenly ________ him that he should solve the problem with a computer.
①  occurred to
②  struck at
③  hit on
④  dawned in
【单选题】 The most important ________ of his speech was that we should all work whole-heartedly for people.
①  element
②  spot
③  sense
④  point
【单选题】 Thescientistdidn’tmind________ andwentonwithhisinvestigation.
①  laughingat
②  tobelaughedat
③  beinglaughedat
④  laughedat
【单选题】 If you work hard, you will be ________; but if you don’t, you will be punished.
①  relaxed
②  relieved
③  reduced
④  rewarded
【单选题】 These plastic flowers look so ________ that many people think they are real.
①  natural
②  beautiful
③  artificial
④  similar