判断题float型float f=3.4是否正确。A对B错
判断题
float型float f=3.4是否正确。
A
对
B
错
参考解析
解析:
暂无解析
相关考题:
请选出创建数组的正确语句。() A.float f[][] = new float[6][6];B.float []f[] = new float[6][6];C.float f[][] = new float[][6];D.float [][]f = new float[6][6];
下面______不是创建数组的正确语句。A.float f[] f[] = new float[5][5];B.float f[][] = new float[5][5];C.float f[][] = new float[][5],D.float [][] f= new float[5][];
下面的说法中正确的是( )。 Ⅰ:有float型数据定义float f1=100.00f;Float F1=new float(f1),要把float型转换为double型时用Double d1=F1.doubleValue()。 Ⅱ:有double型数据定义double d1=100.00;Double D1=new Double(d1),要把double型转换为int型时用 int il=D1.intValue()。 Ⅲ:当把int型转换为double型时,该转换是不能自动转换的,需要强制类型转换。 Ⅳ:以上说法都不对。A.Ⅱ、ⅢB.Ⅰ、ⅢC.Ⅰ、ⅡD.Ⅳ
当用“define F 37.5f”定义后,下列叙述正确的是( )。 A.F是float型数B.F是Char型数S 当用“#define F 37.5f”定义后,下列叙述正确的是( )。A.F是float型数B.F是Char型数C.F无类型D.F是字符串
下列函数的定义,正确的是( )。A.float sum(x,y) {float x,y;……}B.float sum(float x,float y); {……}C.float sum(float x,float y) {……}D.float sum(floatx,floaty) {……}
有以下程序:include float f1 (float n ){return n*n;}float f2 ( float n){return 2 有以下程序:#include <stdio.h>float f1 (float n ){ return n*n;}float f2 ( float n){ return 2 * n;}main( ){ float ( * p1)(float),( * p2)(float),(*t)(float) ,y1,y2; p1 = f1;p2 = f2; y1 = p2(p1(2.0) ); t =p1;p1 = p2;p2 =t; y2=p2(p1(2.0)); prinff("% 3.0f, %3.Of\n" ,y1,y2);}程序运行后的输出结果是( )。A.8,16B.8,8C.16,16D.4,8
下列程序语句中,不正确的是______。A.maia() { float a,b,c; scanf("%f,%f",a,b); c=add(a,b); …… } int add(float x,float y) {……}B.main() { float a,b,c; scanf("%f,%f",a,b); c=add(a,b); …… } float add(float x,float y) {……}C.float add() maia() { float a,b,c; scanf("%f,%f",a,b); c=add(a,b); …… } float add(float x,float y) {……}D.float add(float x, float y) {……} main() { float a,b,c; scanf("%f,%f",a,b); c=add(a, b); …… }
floatf;Strings;现需要把float转化为String,正确的语句是()A、s=String.valueOf(f);B、f=Float.parseFloat(s);C、s=f;D、s=(String)f;
float f[][][] = new float[3][][]; float f0 = 1.0f; float[][] farray = new float[1][1]; What is valid?() A、 f[0] = f0;B、 f[0] = farray;C、 f[0] = farray[0];D、 f[0] = farray[0][0];
Which the three are valid declarations of a float?()A、 float foo = -1;B、 float foo = 1.0;C、 float foo = 42el:D、 float foo = 2.02f:E、 float foo = 3.03d:
假定变量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、Float foo = -1;B、Float foo = 1.0;C、Float foo = 42e1;D、Float foo = 2.02f;E、Float foo = 3.03d;F、Float foo = 0x0123;
下面的方法重载,正确的是()。A、int fun(int a, float b) { } float fun(int a, float b) { }B、float fun(int a, float b) { } float fun(int x, float y) { }C、float fun(float a) { } float fun(float a, float b) { }D、float fun1(int a, float b) { } float fun2(int a, float b) { }
Which three are valid declarations of a float? () A、 Float foo = -1;B、 Float foo = 1.0;C、 Float foo = 42e1;D、 Float foo = 2.02f;E、 Float foo = 3.03d;F、 Float foo = 0x0123;
Which two cause a compiler error?() A、 float[] = new float(3);B、 float f2[] = new float[];C、 float[] f1 = new float[3];D、 float f3[] = new float[3];E、 float f5[] = { 1.0f, 2.0f, 2.0f };F、 float f4[] = new float[] { 1.0f. 2.0f. 3.0f};
class BaseClass{ private float x= 1.0f; protected void setVar (float f) {x = f;} } class SubClass extends BaseClass { private float x = 2.0f; //insert code here } Which two are valid examples of method overriding?() A、 Void setVar(float f) {x = f;}B、 Public void setVar(int f) {x = f;}C、 Public void setVar(float f) {x = f;}D、 Public double setVar(float f) {x = f;}E、 Public final void setVar(float f) {x = f;}F、 Protected float setVar() {x=3.0f; return 3.0f; }
Which two are valid declarations of a float?()A、 float f = 1F;B、 float f = 1.0.;C、 float f = ‘1’;D、 float f = “1”;E、 float f = 1.0d;
单选题类Test1定义如下: 1.public class Test1{ 2. public float aMethod(float a,float b){ return 0;} 3. 4.} 将以下哪种方法插入行3是不合法的。()Apublic float aMethod(float a, float b,float c){ return 0;}Bpublic float aMethod(float c,float d){ return 0;}Cpublic int aMethod(int a, int b){ return 0;}Dprivate float aMethod(int a,int b,int c){ return 0;}
单选题float f[][][] = new float[3][][]; float f0 = 1.0f; float[][] farray = new float[1][1]; What is valid?()A f[0] = f0;B f[0] = farray;C f[0] = farray[0];D f[0] = farray[0][0];
多选题class BaseClass{ private float x= 1.0f; protected void setVar (float f) {x = f;} } class SubClass extends BaseClass { private float x = 2.0f; //insert code here } Which two are valid examples of method overriding?()AVoid setVar(float f) {x = f;}BPublic void setVar(int f) {x = f;}CPublic void setVar(float f) {x = f;}DPublic double setVar(float f) {x = f;}EPublic final void setVar(float f) {x = f;}FProtected float setVar() {x=3.0f; return 3.0f; }
多选题Which two cause a compiler error?()Afloat[] = new float(3);Bfloat f2[] = new float[];Cfloat[] f1 = new float[3];Dfloat f3[] = new float[3];Efloat f5[] = { 1.0f, 2.0f, 2.0f };Ffloat f4[] = new float[] { 1.0f. 2.0f. 3.0f};
多选题class BaseClass{ private float x= 1.0f; protected void setVar (float f) {x = f;} } class SubClass exyends BaseClass { private float x = 2.0f; //insert code here 8. } Which two are valid examples of method overriding?()AVoid setVar(float f) {x = f;}BPublic void setVar(int f) {x = f;}CPublic void setVar(float f) {x = f;}DPublic double setVar(float f) {x = f;}EPublic final void setVar(float f) {x = f;}FProtected float setVar() {x=3.0f; return 3.0f; }
单选题下面的方法重载,正确的是()。Aint fun(int a, float b) { } float fun(int a, float b) { }Bfloat fun(int a, float b) { } float fun(int x, float y) { }Cfloat fun(float a) { } float fun(float a, float b) { }Dfloat fun1(int a, float b) { } float fun2(int a, float b) { }