网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
类aClass的定义如下:classaClass{public:aClass(){}aClass(inti){value=newint(i);}int*value;}若要对类中的value赋值,则下面的语句中,正确的是()。
A
aClassmy;my.value=10;
B
aClassmy;*my.value=10;
C
aClassmy;my.*value=10;
D
aClassmy(10);
参考答案
参考解析
解析:
暂无解析
更多 “单选题类aClass的定义如下:classaClass{public:aClass(){}aClass(inti){value=newint(i);}int*value;}若要对类中的value赋值,则下面的语句中,正确的是()。A aClassmy;my.value=10;B aClassmy;*my.value=10;C aClassmy;my.*value=10;D aClassmy(10);” 相关考题
考题
若要把函数void f()定义为aClass的友元函数,则应该类aClass的定义中加入的语句是( )。A.void f();B.static void f();C.friend f();D.friend void f();
考题
类MyClass的定义如下,若要对value赋值,则下面语句正确的是( )。 classMyClass { public: MyClass( ){} MyClass(inti){value=newint(i);} int*value; };A.MyClassmy;my.value=10;B.MyClassmy;*my.value=10;C.MyClassmy;my.*value=10;D.MyClassmy(10);
考题
若要把函数void f()定义为aClass的友元函数,则应该在类aClass的定义中加入的语句是( )。A.void f();B.static voidf();C.friend f();D.friend void f();
考题
单选题The IP address 192.168.100.1 belongs to which class of IP address space?()A
Class AB
Class BC
Class CD
Class D
考题
单选题用于定义类成员的访问控制权的一组关键字是()。A
class,float,double,publicB
float,boolean,int,longC
char,extends,float,doubleD
public,private,protected
考题
单选题下列常见的系统定义的异常中,属于主机网络故障异常的是()。A
Class Not Found ExceptionB
IOExceptionC
File Not Found ExceptionD
Unknown Host Exception
考题
单选题下面是关于派生类声明的开始部分,其中正确的是( )。A
class virtual B:public AB
virtual class B:public AC
class B:public A virtualD
class B:virtual public A
考题
单选题若要把函数voidf()定义为类aClass的友元函数,则应该在类aClass的定义中加入的语句是()。A
voidf();B
staticvoidf();C
friendf();D
friendvoidf();
考题
单选题The fire of burning plastics is classified as () fire.A
Class AB
Class BC
Class CD
Class D
考题
单选题A fire involving trash and paper waste would be classified as a ().A
class AB
class BC
class CD
class D
考题
单选题A fire in an electrical generator is considered to be ().A
Class AB
Class BC
Class CD
Class D
考题
单选题下列类的定义中正确的是()A
class a{int x=0;int y=1;}B
class b{int x=0;int y=1;};C
class c{intx;int y;}D
class d{intx;int y;};
考题
单选题下列类的定义中,错误的是()。A
class x{....}B
public x extends y{....}C
public class x extends y{....}D
class x extends y implements y1{....}
考题
单选题下列选项中,能实现对父类的getSalary方法重写的是( )。
class Employee{
public double getSalary(){}
}A
class Manager extends Employee{
public int getSalary(double x){}
}B
class Manager extends Employee{
public double getSalary(int x,int y){}
}C
class Manager extends Employee{
public double getSalary(){}
}D
class Manager extends Employee{
public int getSalary(int x,int y){}
}
考题
多选题In which two cases does the compiler supply a default constructor for class A?()Aclass A{}Bclass A { public A(){} }Cclass A { public A(int x){} }Dclass Z {} class A extends Z { void A(){} }
考题
单选题The class of fire on which a blanketing effect is essential to extinguish the fire is ().A
class AB
class BC
class CD
class D
考题
单选题下列常见的系统定义的异常中,编译时无法找到类的异常是()。A
Class Not Found ExceptionB
IOExceptionC
File Not Found ExceptionD
Unknown Host Exception
热门标签
最新试卷