【单选题】【消耗次数:1】
若已定义:intm=7,n=4;floatx=3.0,y=8.0,k;则执行语句k=m/2+n*x/y;后,变量k的值是()。
3
4
4.5
5
参考答案:
复制
纠错
相关题目
【单选题】 以下程序段运行后变量k的值为()。intm=7,n=2,k;k=(m^n)
①  0
②  98
③  20
④  10
【单选题】 若已定义intm=7;floatk=5.5;则表达式k+m%2/4的值为()。
①  6.375
②  6.75
③  5.75
④  5.5
【单选题】 若有定义intm=4321,n=123,k=21;语句printf("%4d+%3d+%2d",m,n,k);执行后的输出结果是()。
①  4321432143211231231232121
②  432112321
③  4321+123+21
④  432+123+021
【单选题】 若w,x,y,z,m均为int型变量,则执行下面语句后的m值是:w=1;x=2;y=3;z=4;m=w<y)?w:x;m=m<y)?m:y;m=m<z)?m:Z;
①  1
②  2
③  3
④  4
【单选题】 若x,i,j,k都是int型变量,则执行下面表达式x=(i=4,j=16,k=32)后x的值为( )。
①  4
②  16
③  32
④  52
【单选题】 若有定义:inta=7;floatx=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是()。
①  2.75
②  0.0
③  3.5
④  2.5
【单选题】 已知 y=2, z=3, n=4,则经过 n=n+ -y*z/n 运算后 n 的值为( ) 。
①  3
②  -1
③  -12
④  -3
【单选题】 若有定义:intx=10,y=8,a;则执行语句a=((--x==y)?x:y);后,变量a的值是()。
①  8
②  9
③  10
④  0
【单选题】 下列程序的输出结果为( ). main( ) {intm=7,n=4; floata=38.4,b=6.4,x; x=m/2+n*a/b+1/2; printf(%f\n,x); }
①  27.000000
②  27.500000
③  28.000000
④  28.500000
【单选题】 若有定义:int m=7;float x=2.5, y=4.7;则表达式x+m%3*(int)(x+y)%2/4的值是( )。
①  2.500000
②  2.750000
③  3.500000
④  0.000000
随机题目
【单选题】 The bank is reported in the local newspaper ____ in broad daylight yesterday.
①  to be robbed
②  robbed
③  to have been robbed
④  having been robbed
【单选题】 The thieves ____ the waste paper all over the room while they were searching for the diamond ring.
①  spread
②  scratched
③  scattered
④  burned
【单选题】 You must pay import ____ on certain goods brought into this country.
①  money
②  fees
③  bills
④  duties
【单选题】 Her mother’ s words of love and help____ the sobbing child.
①  comforted
②  encouraged
③  excited
④  eased
【单选题】 It is a(n) ____ attitude to take towards life.
①  absurd
②  silly
③  stupid
④  authentic
【单选题】 Postal ____ are determined by the class and weight of the parcel mailed.
①  taxes
②  payment
③  fees
④  premium
【单选题】 The bus was____ the driver.
①  in charge of
②  in the charge of
③  take charge of
④  free of charge
【单选题】 You’ d better add it up; I’ m no good at____.
①  fingers
②  calculate
③  figures
④  image
【单选题】 We can hear ____ from the back of the room.
①  just as good
②  just as easy
③  just as well
④  easily as well
【单选题】 She often says her greatest happiness ____ serving the handicapped children.
①  relies on
②  consists in
③  composes of
④  comprises in