float[]f=newfloat[10],则f[0]的值为()A、0.0B、0.0fC、nullD、false
float[]f=newfloat[10],则f[0]的值为()
- A、0.0
- B、0.0f
- C、null
- D、false
相关考题:
函数 void fun(float *sn, int n)的功能是:根据以下公式计算S,计算结果通过形参指针sn传回;n通过形参传入,n的值大于等于0。请填空。void fun( float *sn, int n){ float s=0.0, w, f=-1.0;int i=0;for(i=0; i=n; i++){ f=( )* f;w=f/(2*i+1);s+=w; }( )=s;}
publicclassArrayTest{2.publicstaticvoidmain(String[]args){3.floatf1[],f2[];4.f1=newfloat[10];5.f2=f1;6.System.out.printIn(f2[0]=”+f2[0]);7.}8.}Whatistheresult?() A.Itprintsf2[0]=0.0B.Itprintsf2[0]=NaNC.Anerroratline5causescompiletofail.D.Anerroratline6causescompiletofail.E.Anerroratline6causesanexceptionatruntime.
publicclassTest{privatestaticfloat[]f=newfloat[2];publicstaticvoidmain(Stringargs[]){System.out.println(f[0]=+f[0]);}}Whatistheresult?() A.f[0]=0B.f[0]=0.0C.Compilationfails.D.Anexceptionisthrownatruntime.
floatf[][][]=newfloat[3][][];floatf0=1.0f;float[][]farray=newfloat[1][1];Whatisvalid?() A.f[0]=f0;B.f[0]=farray;C.f[0]=farray[0];D.f[0]=farray[0][0];
publicclassArrayTest{publicstaticvoidmain(String[]args){floatfl[],f2[];fl=newfloat[10];f2=f1;System.out.println(f2[0]=+f2[0]);}}Whatistheresult?() A.Itprintsf2[0]=0.0.B.Itprintsf2[0]=NaN.C.Anerroratline5causescompiletofail.D.Anerroratline6causescompiletofail.E.Anerroratline6causesanexpectationatruntime.
Whichtwocauseacompilererror?() A.float[]=newfloat(3);B.floatf2[]=newfloat[];C.float[]f1=newfloat[3];D.floatf3[]=newfloat[3];E.floatf5[]={1.0f,2.0f,2.0f};F.floatf4[]=newfloat[]{1.0f.2.0f.3.0f};
publicclassArrayTest{publicstaticvoidmain(Stringargs){floatf1,f2;f1=newfloat[10];f2=f1;System.out.printIn(f2[0]=”+f2[0]);}}Whatistheresult?() A.Itprintsf2[0]=0.0B.Itprintsf2[0]=NaNC.Anerroratline5causescompiletofail.D.Anerroratline6causescompiletofail.E.Anerroratline6causesanexceptionatruntime.
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];
public class Test { private static float[] f = new float[2]; public static void main(String args[]) { System.out.println(“f[0] = “ + f[0]); } } What is the result?() A、 f[0] = 0B、 f[0] = 0.0C、 Compilation fails.D、 An exception is thrown at runtime.
假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()A、x==(int)(float)xB、d==(double)(float)dC、f==(float)(double)fD、(f+d)-f==d
单选题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];
单选题假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()Ax==(int)(float)xBd==(double)(float)dCf==(float)(double)fD(f+d)-f==d
单选题设f(x)在x=0处满足f′(0)=f″(0)=…=f(n)(0),f(n+1)(0)>0,则( )。A当n为偶数时,x=0是f(x)的极大值点B当n为偶数时,x=0是f(x)的极小值点C当n为奇数时,x=0是f(x)的极大值点D当n为奇数时,x=0是f(x)的极小值点