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

题目内容 (请给出正确答案)

已知: 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” 相关考题
考题 已有定义:float x=5.5;则表达式:x=(int)x+2的值为。

考题 已知程序中已经定义了函数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

考题 表达式float(25)/4 int(14.4)%5的值分别为【 】和【 】。

考题 已知char a;int b;float c;double d;则表达式a*b+c-d结果为A.doubleB.intC.floatD.char

考题 在下面的一维数组定义中,()语句有语法错误。A.inta[]={l,2,3};B.int a[10]={0};C.int a[]="abcdef";D.int a[5]

考题 在下面的一维数组定义中,()语句有语法错误。A. int a[] ={1,2,3};B. int a[10]={0};C. int a[] ="abcdef";D. int [5]

考题 设有如下变量定义: 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 m=10:A.int x=m;B.int y=10;C.int ZD.float t=m;

考题 若有定义: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)

考题 在下列表达式赋值中正确的是()A.double b= 2.5B.float f=1.8C.char c=”a”D.byte b=300

考题 已知char a;int b;float C;double d;则表达式a-b c-d结果为( )型。A)doubleB)floatC)intD)char

考题 在下面的一维数组定义中,()语句有语法错误。A、int a[ ]={1,2,3};B、int a[10]={0};C、int a[ ];D、int a[5];

考题 在下面的函数声明中,存在着语法错误的是()。A、BC(int a, int)B、BC(int, int)C、BC(int, int=5)D、BC(int x=6, int y)

考题 switch(表达式)语句中的“表达式”,允许的类型是()。A、float,intB、float,int,charC、int,charD、char,double

考题 根据switch使用的注意事项:已知int a;float b;float c;char d;输入值,switch后面括号里的表达式可以是()。A、aB、bC、cD、d

考题 若有C语句int k=5;float x=1.2;,则表达式(int)(x+k) 的值是()A、5B、6.2C、7D、6

考题 假定变量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’

考题 单选题在下面的函数声明中,存在着语法错误的是()。A BC(int a, int)B BC(int, int)C BC(int, int=5)D BC(int x=6, int y)

考题 单选题若有C语句int k=5;float x=1.2;,则表达式(int)(x+k) 的值是()A 5B 6.2C 7D 6

考题 单选题下列表达式或语句中,有语法错误的是()A  n=12%3.0;(n为int型)B  12/3.0C  12/3D  ‘a’’b’