单选题______A arise B derive C raise D originate

题目
单选题
______
A

arise        

B

derive        

C

raise        

D

originate

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

We can derive great pleasure ( )our studies.

A.of

B.to

C.from

D.in


参考答案:C

第2题:

下列类的定义中,有( ) 处语法错误。 class Base { public: Base(){} Base(int i) { data=i; } private: int data; }; class Derive: public Base { public: Derive(): Base(O) { } Derive(int x) { d=x; } void setvalue(int i) { data=i; } private: d; };

A.1

B.2

C.3

D.4


正确答案:B
解析:本题考核派生类的定义和成员的访问权限。第一处错误:在派生类的构造函数Derive(intx)中没有调用基类的构造函数对基类对象初始化:第二处错误:数据data是基类Base的私有成员,派生类Derive不能访问,所以在函数setvalue中对data的赋值是错误的。

第3题:

Most quality problems:

A . originate in the quality department where the ultimate responsibility for quality rests.

B . originate on the shop floor because of waste and product rework.

C . are the results of management inattention to potential quality improvement ideas.

D . could be eliminated if shop supervisors monitored their work more closely.

E . A and B


正确答案:C

第4题:

下列类的定义中,有( )处语法错误。 class Base { public: Base(){} Base(int i) { data=i; } private: int data; }; class Derive : public Base { public: Derive() : Base(O) {} Derive (int x) { d=x; } void setvalue(int i) { data=i; } private: int d; };

A.1

B.2

C.3

D.4


正确答案:B
解析:本题考核派生类的定义和成员的访问权限。第①处错误:在派生类的构造函数Derive(intx)中没有调用基类的构造函数对基类对象初始化。第②处错误:数据data是基类Base的私有成员,派生类Derive不能访问,所以在函数setvalue中对data的赋值是错误的。

第5题:

以下程序的执行结果是______。 include class base { public: virtual void who(){c

以下程序的执行结果是______。

include<iostream.h>

class base

{

public:

virtual void who(){cout<<"base class"<<endl:}

};

class derrvel:public base

{

public:

void who(){cout<<"derivel class"<<endl:}

};

class derive2;public base

{

public:

void who() {cout<<"derive2 class"<<endl;}

};

void main()

{

base obj1,*P;

derive1 obj2;

derive2 obj3:

p=&obj1;

p->who();

p=&obj2:

p->who();

p=&obj3;

p->who();

}


正确答案:base class derivel class derive2 class
base class derivel class derive2 class

第6题:

[ A] develop

[ B ] differ

[ C] depart

[ D] derive


正确答案:B
39.B【精析】develop from由…发展而来;differ from不同于…;depart from违反,背离(常规);derive from起源于。这里讲的是水力电站与潮汐电站在供电的持续性方面的不同之处,故选B。

第7题:

officially, canada refers to itself as a multicultural society within a bilingual framework. did not originate in america. ()


参考答案:正确

第8题:

20 Most quality problems:

A. originate in the quality department where the ultimate responsibility for quality rests.

B. originate on the shop floor because of waste and product rework.

C. are the results of management inattention to potential quality improvement ideas.

D. could be eliminated if shop supervisors monitored their work more closely.

E. A and B


正确答案:C

第9题:

 A completely new situation will _____ when the examination system comes into existence.

(A) arise (C) raise

(B) rise (D) arouse

 

 


选A

arise  出现
rise  上升
raise  提高,上升
arouse 引起,激发

第10题:

有如下程序includeusing nameSpace std;class base{public:vinual void f1() { cout<

有如下程序 #include<iostream> using nameSpace std; class base { public: vinual void f1() { cout<<"F1 Base"; } virtual void f2() { cout<<"F2Base"; } }; class derive:public base { void f1() { cout<<"F1Derive"; } void f2(int x) { cout<<"F2Derive"; } }; int main() { base obj1,*p; derive obj2; p=&obj2; p—>f1(); p—>f2(); return 0; } 执行后的输出结果是

A.F1Derive F2Base

B.F1Derive F2Derive

C.F1Base F2Base

D.F1Base F2Derive


正确答案:A
解析:本题主要考查C++中虚函数机制及其继承过程中的要点。虚函数在基类中加关键字virtual声明,在派生类中重新定义;如果派生类没有覆盖虚函数,则程序执行中将会执行基类的虚函数版本。题目程序中,建立了基类base,其内函数voidf1()和voidf2()均被声明为虚函数,并在调用时会显式的发出声明。派生类derive利用public方式继承基类base,并覆盖其基类base中的虚函数f1();对于base中的虚函数f2(),由于派生类derive中的同名函数f2()中带有参数intx,因此被编译器认为是函数重载,而不作虚函数覆盖处理,因此实际上派生类derive中包含两个f2()函数,一个不带参数,调用时执行基类base中的f2()函数版本,一个带参数intx,调用时执行重载后的版本。题目main()函数中,定义了基类对象。obj1和基类指针*p,同时定义了派生类对象。obj2。p指向。obj2时:p—>f1()函数调用执行派生类覆盖后的版本,输出D1:p->f2()由于不带参数,因此执行未经派生类覆盖的函数版本,即基类base中的f1()函数版本。

更多相关问题