已知: 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
第1题:
表达式float(25)/4 int(14.4)%5的值分别为【 】和【 】。
第2题:
在下面的一维数组定义中,()语句有语法错误。
A.inta[]={l,2,3};
B.int a[10]={0};
C.int a[]="abcdef";
D.int a[5]
第3题:
设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )
A.2.5
B.3.5
C.4.5
D.表达式不正确
第4题:
类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){…}
第5题:
若有定义:int a=4, b=5;float x=3.4,y=2.1;,则下列表达式的值为( )。 (float) (a+b)/2+(int)x%(int)y
A.5.5
B.55
C.5.5
D.55
第6题:
在下面的函数声明中,存在语法错误的是______ 。
A.void BC (int a,int)
B.void BD (int,int)
C.void BE (int,int =5)
D.void BF (int x;int y)
第7题:
在下列表达式赋值中正确的是()
A.double b= 2.5
B.float f=1.8
C.char c=”a”
D.byte b=300
第8题:
在下面的一维数组定义中,()语句有语法错误。
第9题:
switch(表达式)语句中的“表达式”,允许的类型是()。
第10题:
若有C语句int k=5;float x=1.2;,则表达式(int)(x+k) 的值是()
第11题:
下列表达式或语句中,有语法错误的是()
第12题:
5
6.2
7
6
第13题:
已知char a;int b;float c;double d;则表达式a*b+c-d结果为
A.double
B.int
C.float
D.char
第14题:
在下面的一维数组定义中,()语句有语法错误。
A. int a[] ={1,2,3};
B. int a[10]={0};
C. int a[] ="abcdef";
D. int [5]
第15题:
在下面的函数声明中,存在着语法错误的是
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)
第16题:
下列表示引用的方法中,( )是正确的。 已知:int m=10:
A.int &x=m;
B.int &y=10;
C.int &Z
D.float &t=&m;
第17题:
若有定义:“int a=4,b=5;float x=3.4,y=2.1;”,则下列表达式的值为( )。 (float)(a+b)/2+(int)x%(int)y;
A.5.5
B.55
C.5.500000
D.55.00000
第18题:
下列重载函数中,正确的是( )。
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)
第19题:
已知char a;int b;float C;double d;则表达式a-b c-d结果为( )型。
A)double
B)float
C)int
D)char
第20题:
在下面的函数声明中,存在着语法错误的是()。
第21题:
根据switch使用的注意事项:已知int a;float b;float c;char d;输入值,switch后面括号里的表达式可以是()。
第22题:
假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()
第23题:
BC(int a, int)
BC(int, int)
BC(int, int=5)
BC(int x=6, int y)
第24题:
n=12%3.0;(n为int型)
12/3.0
12/3
‘a’>’b’