问题 单项选择题

派生类的构造函数的成员初始化列表中,不能包含( )。

A.基类的构造函数

B.派生类中子对象的初始化

C.基类的子对象初始化

D.派生类中一般数据成员的初始化

答案

参考答案:C

解析: 在C++中,构造函数不能被继承,因此;派生类的构造函数必须通过调用基类的构造函数来初始化基类子对象。所以,在定义派生类的构造函数时,除了对自己的数据成员进行初始化外,还必须负责调用基类构造函数使基类的数据成员得以初始化。如果派生类中还有子对象,还应包含对子对象初始化的构造函数。但是它不负责基类中子对象的初始化。

阅读理解

Every childwants to have pocket money(零花钱). Why do their parents just give them some money?  小题1: 

The amount of money that parents give to their children differs from family to family.   小题2:   Some children get weekly pocket money. Others get monthly pocket money.

First of all, children are expected to make a choice between spending and saving. Then parents should make the children understand what they expect their children to buy with the money. At first, some young children may spend all of the money soon after they receive it. Parents are usually advised not to offer more money until it is the right time.    小题3: 

In order to encourage their children to do some housework, some parents give pocket money if the children help around the home. Some experts(专家) think it not wise to pay the children for doing that.    小题4: 

Pocket money can give children a chance to experience the three things they can do with the money. They can spend it by giving it to a good cause. They can spend it by buying things they want.   小题5: Saving helps children understand that costly goals require sacrifice. Saving can also open the door to future saving and investing for children.

A.Some children are not good at managing their pocket money.

B.As helping at home is a normal part of family life.

C.Learning how to get money is very important for every child.

D.By doing so, these children will learn that spending must be done with a budget(预算).E .Timing is another consideration.

F .They can save it for future use.

G .One main purpose is to let kids learn how to manage their own money.

单项选择题