【单选题】【消耗次数:1】
设:inta=1,b=2,c=3,d=4,m=2,n=2;执行(m=a>b)&&(n=c>d)后n的值为()。
1
2
3
4
参考答案:
复制
纠错
相关题目
【单选题】 下述程序的运行结果( )。 #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
【单选题】 下述程序的运行结果( )。 #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
【单选题】 设有定义:int m,n,a,b,c,d;和语句m=n=a=b=c=d=0;执行:(m=a==b)(n=c==d);后,m,n 的值分别是()。
①  0,0
②  0,1
③  1,0
④  1,1
【单选题】 设a=1,b=2,c=3,d=4,则表达式:a>b?a:c>d?a:d的结果为()
①  4
②  3
③  2
④  1
【单选题】 以下程序的运行结果是:main){intk=4,a=3,b=2,c=;printf\n%d\n,k<a?k:c<b?c:a);}
①  4
②  3
③  2
④  1
【简答题】 统计整数n的各个位上出现数字1、2、3的次数,并通过外部(全局)变量c1、c2、c3返回主函数。 例如,当n=123114350时,结果应该为:c1=3 c2=1 c3=2。 #includeint c1,c2,c3; void fun(long n) { c1 = c2 = c3 = 0; while (n) { /************found************/ switch([填空1]) { case 1: c1++; break; /************found************/ case 2: c2++;[填空2] case 3: c3++; } n /= 10; } } main() { int n=123114350; fun(n); printf(\nn=%d c1=%d c2=%d c3=%d\n,n,c1,c2,c3); }
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=1,b=2,c=3; if(c=a)printf(%d\n else printf(%d\n }
①  1
②  3
③  5
④  6
【单选题】 inta=1,b=2,c=3; if(a>b)a=b; if(a>c)a=c; 则a的值为().
①  1
②  2
③  3
④  不一定
【单选题】 以下程序的运行结果是( )。 Main() {int k=4,a=3,b=2,c=; printf(\n %d\n,ka?k:cb?c:a); }
①  4
②  3
③  2
④  1
【单选题】 在执行inta[][3]={{1,2},{3,4}};语句后a[1][2]的值是()
①  3
②  4
③  0
④  2
随机题目
【单选题】 38. In recent years much more emphasis has been put______ developing the students productive skills.
①  onto
②  in
③  over
④  on
【单选题】 39. A survey was carried out on the death rate of those who were infected by SARS, ________were surprising.
①  asresults
②  whichresults
③  theresultsofit
④  theresultsofwhich
【单选题】 34.I heard that you really had a wonderful time at Johns birthday party, _____?
①  didntI
②  didntyou
③  hadntyou
④  willyou
【单选题】 37._____ of water makes Death Valley a desert, but it is by no means devoid.
①  Lacking
②  Beinglack
③  Becauseoflack
④  Lack
【单选题】 33.Modern science and technology has _____ communication between people far apart.
①  madeconvenient
②  madeitconvenient
③  madeitconvenientfor
④  madeitconvenientto
【单选题】 31. The professor said he could talk on _____ interested the audience.
①  anytopic
②  whichtopic
③  whichevertopic
④  thetopichethoughtit
【单选题】 32.Under no circumstance _____ to tell lies to parents.
①  childrenareallowed
②  arechildrenallowed
③  childrenwillallow
④  willchildrenallow
【单选题】 40. Many workers were organized to clear away ______remained of the World Trade Center.
①  those
②  that
③  what
④  where
【单选题】 37、 我国的和平外交政策的基本原则是( )
①  维护世界和平
②  反对霸权主义
③  真正不结盟
④  独立自主
【单选题】 33、实现两岸关系和平发展的政治基础是坚持一个中国原则的( )
①  江泽民“八项主张”
②  “九二共识”
③  反分裂国家法
④  胡宋会谈