《面向对象程序设计C++》期末试卷及标准答案(A).pdf

上传人:H****o 文档编号:56647301 上传时间:2022-11-02 格式:PDF 页数:13 大小:61.90KB
返回 下载 相关 举报
《面向对象程序设计C++》期末试卷及标准答案(A).pdf_第1页
第1页 / 共13页
《面向对象程序设计C++》期末试卷及标准答案(A).pdf_第2页
第2页 / 共13页
点击查看更多>>
资源描述

《《面向对象程序设计C++》期末试卷及标准答案(A).pdf》由会员分享,可在线阅读,更多相关《《面向对象程序设计C++》期末试卷及标准答案(A).pdf(13页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、第 1 页面向对象程序设计C+期末考试试卷(A)班级:姓名:学号:分数:题号一二三四总分得分试卷说明:本套试题共四个大题,全部题目都答在答题纸上,写在其他地方均无效。(答题纸在本套试卷的第10 页上)一、选择题(每小题2 分,共 40 分)1、C+是()。A.面向对象的程序设计语言B.面向过程的程序设计语言C.既支持面向对象的程序设计又支持面向过程的程序设计的混合型语言D.非结构化的程序设计语言2、面向对象程序设计思想的主要特征中不包括()。A.封装性B.多态性C.继承性D.功能分解,逐步求精3、若定义:string str;当语句 cinstr;执行时,从键盘输入:Microsoft Vis

2、ual Studio 6.0!所得的结果是 str=()。A.Microsoft Visual Studio 6.0!B.Microsoft C.Microsoft Visual D.Microsoft Visual Studio 6.0 4、考虑下面的函数原型声明:void testDefaulParam(int a,int b=7,char z=*);下面函数调用中,不合法的是()。A.testDefaulParam(5);B.testDefaulParam(5,8);C.testDefaulParam(5,#);D.testDefaulParam(0,0,*);5、下列语句中,将函数 i

3、nt sum(int x,int y)正确重载的是()。A.float sum(int x,int y);B.int sum(int a,int b);C.float sum(float x,float y);D.double sum(int y,int x);第 2 页6、下列表示引用的方法中,()是正确的。已知:int a=1000;A.int&x=a;B.char&y;C.int&z=1000;D.float&t=&a;7、在一个函数中,要求通过函数来实现一种不太复杂的功能,并且要求加快执行速度,选用()。A.内联函数B.重载函数C.递归调用D.嵌套调用8、下列有关 C+类的说法中,不正

4、确的是()。A.类是一种用户自定义的数据类型B.只有类中的成员函数或类的友元函数才能存取类中的私有成员C.在类中,如果不做特别说明,所有成员的访问权限均为私有的D.在类中,如果不做特别说明,所有成员的访问权限均为公用的9、已知 X类,则当程序执行到语句:X array3;时,调用了()次构造函数。A.0 B.1 C.2 D.3 10、下面说法中,正确的是()A.一个类只能定义一个构造函数,但可以定义多个析构函数B.一个类只能定义一个析构函数,但可以定义多个构造函数C.构造函数与析构函数同名,只要名字前加了一个求反符号()D.构造函数可以指定返回类型,而析构函数不能指定任何返回类型,即使是 vo

5、id类型也不可以11、已知:print()函数是一个类的常成员函数,它无返回值,下列表示中,()是正确的。A.void print()const;B.const void print();C.void const print();D.void print(const);12、下面描述中,表达错误的是()A.公用继承时基类中的public 成员在派生类中仍是public 的B.公用继承时基类中的private 成员在派生类中仍是private 的C.公用继承时基类中的protected成员在派生类中仍是protected的文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R

6、3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1

7、R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A

8、1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10

9、A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB1

10、0A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB

11、10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 Z

12、B10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3第 3 页D.私有继承时基类中的 public成员在派生类中是 private的13、设置虚基类的目的是()。A.简化程序B.消除二义性C.提高运

13、行效率D.减少目标代码14、下面()的叙述不符合赋值兼容规则。A.派生类的对象可以赋值给基类的对象B.基类的对象可以赋值给派生类的对象C.派生类的对象可以初始化基类的对象D.派生类的对象的地址可以赋值给指向基类的指针15、关于虚函数的描述中,()是正确的。A.虚函数是一个 static类型的成员函数B.虚函数是一个非成员函数C.基类中说明了虚函数后,派生类中与其对应的函数可不必说明为虚函数D.派生类的虚函数与基类的虚函数具有不同的参数个数和类型16、下面关于友元的描述中,错误的是()。A.友元函数可以访问该类的私有数据成员B.一个类的友元类中的成员函数都是这个类的友元函数C.友元可以提高程序的

14、运行效率D.类与类之间的友元关系可以继承17、下列关于静态数据成员的说法,不正确的是()。A.类中定义的公用静态数据成员,可以通过类的对象来访问B.类中定义的所有静态数据成员,都必须在类外初始化C.静态数据成员不是所有对象所共用的D.普通的成员函数可以直接访问类中的静态数据成员18、如果表达式+i*k 中的“+”和“*”都是重载的友元运算符,若采用运算符函数调用格式,则表达式还可以表示为()。A.operator*(i.operator+(),k)B.operator*(operator+(i),k)C.i.operator+().operator*(k)D.k.operator*(opera

15、tor+(i)文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A

16、1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10

17、A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB1

18、0A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB

19、10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 Z

20、B10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3

21、ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3第 4 页19、下面对模板的声明,正确的是()。A.tem

22、plate B.template C.template D.template 20、下列的各类函数中,()不是类的成员函数A.构造函数B.析构函数C.友元函数D.复制构造函数二、填空题(前 14个空,每空 1分,后 3个空,每空 2分,共 20分)1、类和对象的关系可表述为:类是对象的,而对象则是类的。2、静态成员函数没有隐含的,所以,在 C+程序中,静态成员函数主要用来访问静态数据成员,而不访问非静态成员。3、在图 1中,A,B,C,D,E,F均是类,其中属于单继承的派生类有,属于多继承的派生类有,类 F的基类有,类 A 的派生类有。4、如果只想保留公共基类的一个复制,就必须使用关键字把这个

23、公共基类声明为虚基类。5、从实现的角度来讲,多态性可以划分为两类:和。6、如果一个类包含一个或多个纯虚函数,则该类称为。7、若 要 把 void fun()定 义 为 类 A 的 友 元 函 数,则 应在 类 A 的 定 义 中 加 入 语句。8、列出 C+中的两种代码复用方式:和。9、析构函数的作用是。10、假定A是一个类名,则该类的拷贝构造函数的原型说明语句为:。A B C D E F 图 1 类的继承层次图文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:C

24、R1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:

25、CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码

26、:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编

27、码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档

28、编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文

29、档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3

30、文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3第 5 页11、后置自增运算符“+”重载为类的成员函数(设类名为 A)的形式为:。三、阅读下面 4个程序,写出程序运行时输出的结果。(共13分)1、#include using namespace std;void fun(int&a,int&b)int

31、p;p=a;a=b;b=p;void exchange(int&a,int&b,int&c)if(ab)fun(a,b);if(ac)fun(a,c);if(bc)fun(b,c);int main()int a=12,b=89,c=56;exchange(a,b,c);couta=a,b=b,c=cendl;return 0;2、#include using namespace std;class A public:A()cout A;文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1

32、R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A

33、1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10

34、A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB1

35、0A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB

36、10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 Z

37、B10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3

38、ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3第 6 页;class B public:B()cout B;class C:public A public:C()cout C;private:B b;int main()C obj;return 0;3、#include us

39、ing namespace std;class A public:A()coutA:A()called.n;virtual A()coutA:A()called.n;class B:public A public:B(int i)coutB:B()called.n;文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3

40、M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R

41、3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1

42、R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A

43、1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10

44、A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB1

45、0A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB

46、10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3第 7 页buf=new chari;virtual B()delete buf;coutB:B()called.n;private:char*buf;int main()A*a=new B(15);delete a;return 0;4、#include using namespace std;class A public:void f()coutCall As function f()endl;cl

47、ass B public:void f()coutCall Bs function f()endl;void g()coutCall Bs function g()endl;class C:public A,public B 文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q

48、9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9

49、Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G

50、9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9G9Q9 HB10X5M7M4R3 ZB10A1R3M10I3文档编码:CR1D2N9

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁