double
float
int
short
第1题:
若有定义:int a=4,b=5;float x=3.4,y=2.1;,则下列表达式的值为( )
(float) (a+b)/2+(int)×%(int)y
A.5.5
B.55
C.5.500000
D.55.00000
第2题:
设有如下的变量定义:
double x=4.700000;float y=2.5f;int z=7;
则执行表达式“y+z%3* (int) (x+y)%2/4”后的值是【 】。
第3题:
已有定义:float x=5.5;则表达式:x=(int)x+2的值为。
第4题:
若有以下定义: char a;int b; float c;double d; 则表达式a*b+b-c值的类型为( )。
A. float
B.int
C.char
D.double
第5题:
设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。
第6题:
若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是
A.2.500000
B.2.750000
C.3.500000
D.0.000000
第7题:
有以下定义:“int a;long b;double X,Y;”,则以下选项中正确的表达式是( )。
A.a%(int x—y)
B.a=x!=Y;
C.(a*y)%b
D.y=x+y=X
第8题:
若有以下类型说明语句: char w;int x;float y, z; 则表达式w*x+z-y的结果为______类型。
A.float
B.char
C.int
D.double
第9题:
若有以下类型说明语句: char w;int x;flooat y,z; 则表达式w*x+z-y的结果为______类型。
A.float
B.char
C.int
D.double
第10题:
如已定义X和Y为double类型,则表达式X=1,y=x+5/2的值是( )。
A.2
B.3.0
C.3
D.3.5