网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
已知: int a=5;float b=5.5; 在下列表达式中,没有语法错误的是()。
A.a%3+b
B.b*b&&++a
C.(a>b)+(int(b)%2)
D.a&&b
E.a==b
参考答案和解析
a%3+b;b*b&&++a;a&&b;a==b
更多 “已知: int a=5;float b=5.5; 在下列表达式中,没有语法错误的是()。A.a%3+bB.b*b++aC.(a>b)+(int(b)%2)D.abE.a==b” 相关考题
考题
已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是A.char test (int,int,int);B.double test(int,int,double);C.int test(int,int,int=O);D.float test(int,int,float=3.5F);
考题
在下面的函数声明中,存在着语法错误的是 ( )。A.void BC(int a,int)B.void Bd(int,int)C.void BE(int,int=5)D.int BF(int x;int y)
考题
若有定义:int a=4,b=5;float x=3.4,y=2.1;,则下列表达式的值为( )(float) (a+b)/2+(int)×%(int)yA.5.5B.55C.5.500000D.55.00000
考题
设有如下变量定义: 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.表达式不正确
考题
在下面的函数声明中,存在着语法错误的是A.void BC(int a,int)B.void BD(int,int)C.void BE(int,int t=5)D.int BF(int x;int y)
考题
类A定义如下: class A { private int x=10; int getx() { return x;} } class B extends A { private int x=15; //需要覆盖getx()方法 } 在下述方法中可以在类B中覆盖getx()方法的是 ( )A.int getx(){…}B.int getx(float f){…}C.float getx(){…}D.double getx(float f){…}
考题
若有定义:int a=4, b=5;float x=3.4,y=2.1;,则下列表达式的值为( )。 (float) (a+b)/2+(int)x%(int)yA.5.5B.55C.5.5D.55
考题
若有定义:“int a=4,b=5;float x=3.4,y=2.1;”,则下列表达式的值为( )。 (float)(a+b)/2+(int)x%(int)y;A.5.5B.55C.5.500000D.55.00000
考题
在下面的函数声明中,存在语法错误的是______ 。A.void BC (int a,int)B.void BD (int,int)C.void BE (int,int =5)D.void BF (int x;int y)
考题
下列重载函数中,正确的是( )。A.void fun(int a,float b);void fun(int C,float d)B.void fun(int a,float b);void fun(float a,int b)C.float fun(int a,float b);int fun(int b,float a)D.int fun(int a,int b);float fun(int a,int b)
考题
假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()A、x==(int)(float)xB、d==(double)(float)dC、f==(float)(double)fD、(f+d)-f==d
考题
单选题下列表达式或语句中,有语法错误的是()A
n=12%3.0;(n为int型)B
12/3.0C
12/3D
‘a’’b’
热门标签
最新试卷
![瑞牛题库 章节练习 历年真题 模拟试卷](http://assets.51tk.com/51_sidebar_right_index.jpg)