【单选题】【消耗次数: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
随机题目
【单选题】 18 It was in 1960 _____he first achieved his fame as a writer.
①  when
②  that
③  where
④  which
【单选题】 12.The boxing _______between the two fighters was marked by brutality.
①  contest
②  context
③  competition
④  . race
【单选题】 6.I have taught to be very ______ about my manners at parties.
①  elaborate
②  conscientious
③  careful
④  conscious
【单选题】 10.This 1998 incident is timely ______ of the threat that a market economy may face.
①  caution
②  notice
③  remainder
④  reminder
【单选题】 14.If you move to the left, you _______able to see the church.
①  will be
②  were
③  are
④  have been
【单选题】 3.This little girl began to show the sign of ______ her brother in spoken English.
①  better
②  surpassing
③  exceeding
④  beyond
【单选题】 8. As a part of______ process, gradual loss of hearing ability can be difficult to deal with.
①  aging
②  aged
③  old
④  elderly
【单选题】 5.Sometimes animals can _______ the coming disaster, so they can protect themselves.
①  imagine
②  taste
③  sense
④  ignore
【单选题】 13.Oil floats if you ______it on water.
①  will pour
②  are going to pour
③  pour
④  poured
【单选题】 22. When a fire ______ at the National Exhibition in London, at least ten priceless paintings were completely destroyed.
①  broke off
②  broke out
③  broke down
④  broke up