left
none
right
all
第1题:
下面______不是创建数组的正确语句。
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][];
第2题:
类Test定义如下,将下列______方法插入③行处是不合法的。 ( )①public class Test{②public float Method(float a,float b){}③④}
A.public float Method(float a,float b,float c){}
B.public float Method(float c,float d){}
C.public int Method(int a,int b){}
D.private float Method(int a,int b,int c){}
第3题:
下列程序的招待结果是【 】。
include <iostream. h>
float temp;
float & fn2(float r)
{
temp=r* r* 3.14;
return temp;
}
void main( )
{
float a=fn2(5.0);
float& b=fn2(5.0)
b=20;
cout<<temp<<end1;
}
第4题:
下列重载函数中,正确的是( )。
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)
第5题:
类Test定义如下,将下列哪个方法插入③行处是不合法的( )?
① public class Test{
② public float Method(float a,float B) { }
③ ______
④ }
A.public float Method(float a,float b,float C) { }
B.public float Method(float c,float d){ }
C.public int Method(int a,int B) { }private float Method(int a,int b,int C) { }
D.private float Method(int a,int b,int C) { }
第6题:
A.left
B.right
C.none
D.both
第7题:
下列程序的执行结果是______。
include<iostream.h>
float temp;
float&fn2(float r)
{
temp=r*r*3.14;
return temp;
}
void main( )
{
float a=fn2(5.0);
float&b=fn2(5.0);
b=20;
cout<<temp<<endl;
}
第8题:
A. position和float
B. float和clear
C. position和width
D. float和width
第9题:
下列函数的定义,正确的是( )。
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) {……}
第10题:
下列程序语句中,不正确的是______。
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); …… }