网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
表达式:(int)((double)9/2)-9%2的值是(  )。
A

4

B

0

C

3

D

5


参考答案

参考解析
解析:
运算符“/”、“%”的优先级高于“-”,所以先进行除法和求余运算,再进行减法运算。强制类型转换表达式的形式:(类型名)(表达式)。“9/2”结果为4,转换成double类型再转换成int类型结果依然为4,9%2的结果为1,最后结果为4-1=3。答案选择C选项。
更多 “单选题表达式:(int)((double)9/2)-9%2的值是(  )。A 4B 0C 3D 5” 相关考题
考题 (6)表达式(int)((double)(5/2)+2.5)的值是【6】

考题 表达式 (int)((double)(5/2)+2.5) 的值是【 6 】

考题 表达式: (int)((double)9/2)-(9)%2 的值是A)0B)3C)4D)5

考题 国家二级C语言真题 表达式(int)((double)9/2)-(9)%2的值是A0B3C4D5

考题 设x和y均为int型变量,且x=1,y=2,则表达式double(1+x/y)的值为【12】。

考题 设有如下的变量定义:double x=4.700000;float y=2.5f;int z=7;则执行表达式“y+z%3* (int) (x+y)%2/4”后的值是【 】。

考题 设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )A.2.5B.3.5C.4.5D.表达式不正确

考题 设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。

考题 表达式:(int)((double)9/2)-(9)%2的值是( )。A.0B.3C.4D.5

考题 a和b均为double型变量,且a=1.5,b=2,则表达式(int)a+b/b的值为:A.2.500000B.2.000000C.2D.3

考题 表达式:(int)((double)9/2)-(9)%2.的值是A.0B.3C.4D.5

考题 设有定义:char c;float f;int i;unsignedu;double d;下列各表达式的类型分别是()1.u+92.d!=f&&(i+2)3.8.2*i+c A.1.unsigned,2.int,3.doubleB.1.double,2.double,3.doubleC.1.int,2.double,3.charD.1.unsigned,2.double,3.int

考题 若有定义:int a=6,b=2;charc1=’a’,c2=’b’;则表达式a+b%5+c2-c1的值是() A.7B.8C.9D.表达式错误

考题 若有定义:int a,b;则表达式(a=2,b=5,a*2,b++,a+b)的值是() A.7B.8C.9D.10

考题 若有定义:int i,j;则表达式(i=2,j=5,i++,i+j++)的值是() A.7B.8C.9D.10

考题 表达式:(im)((double)9/2)一9%2的值是( )。A.0B.3C.4D.5

考题 有如下说明: int a[10]={1,2,3,4,5,6,7,8,9,10},* P=a; 则数值为9的表达式是( )。 A.*P+9SXB 有如下说明: int a[10]={1,2,3,4,5,6,7,8,9,10},* P=a; 则数值为9的表达式是( )。A.*P+9B.木(P+8)C.*P+=9D.P+8

考题 下列表达式的值为4的有哪几项。() A、2*9-14B、abs(-2)*2C、Sqr(9)+1D、Int( 2.9)*2

考题 表达式Sqr(25)1And4/9=int(4/9)的值是()。

考题 执行下面的语句后,a、b、c的值分别是() int a=2; int b=(a++)*3; int c=(++a)*3;A、2、6、6B、4、9、9C、4、6、12D、3、9、9

考题 若有定义:int a=6,b=2;charc1=’a’,c2=’b’;则表达式a+b%5+c2-c1的值是()A、7B、8C、9D、表达式错误

考题 若有定义:int a,b;则表达式(a=2,b=5,a*2,b++,a+b)的值是()A、7B、8C、9D、10

考题 表达式SGN(INT(SQR(ABS(-9.61))))的值是()A、-9B、9C、1D、-1

考题 单选题设有定义:char c;float f;int i;unsignedu;double d;下列各表达式的类型分别是()1.u+92.d!=f(i+2)3.8.2*i+cA 1.unsigned,2.int,3.doubleB 1.double,2.double,3.doubleC 1.int,2.double,3.charD 1.unsigned,2.double,3.int

考题 单选题若有定义:int a,b;则表达式(a=2,b=5,a*2,b++,a+b)的值是()A 7B 8C 9D 10

考题 单选题若有定义:int a=6,b=2;charc1=’a’,c2=’b’;则表达式a+b%5+c2-c1的值是()A 7B 8C 9D 表达式错误

考题 单选题表达式SGN(INT(SQR(ABS(-9.61))))的值是()A -9B 9C 1D -1