- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
c习题课答案
PAGE \* MERGEFORMAT 18
1. I in C++ , There is a kind of class that it can only be inherited but cannot be initiated, we call that class as a ( ),to define that kind of class, it has to have at least a ( )?。
(A) virtual function?? (B) pure virtual function?? (C)?abstract class? (D)friend class
2. Assume that AB is a class, the declaration of copy constructor of that class should be ( )。
(A)AB&(AB x) (B)AB(AB x) (C)AB(AB &x) (D)AB(AB *x)
3. For the member of a structure, the default access modifier is ( )。 ?? (A) public;?? (B) private;?? (C) protected;??? (D) static;
4. Assume AB is a class, to execute statement “AB a(4),b[3],*p[2];”, how many times to invoke the constructor?( )。
(A) 3 (B) 4 (C) 6 (D) 9
5. Which of the following is not correct ( )
(A) The name of constructor is same as the name of the class
(B) class constructor could have default parameters
(C) the default return type of a constructor is of type int
(D) the constructor can be overloaded
6. Parameterized stream manipulator setfill specifies the fill character that is displayed when an output is displayed in a field wider than the number of characters or digits in the output. The effect of setfill applies:
(A) Only to the current value being displayed.
(B) Only to outputs displayed in the current statement.
(C) Until explicitly set to a different setting.
(D) Until the output buffer is flushed.
7. Assuming the following is the beginning of the constructor definition for class Circle which inherits from class Point,
Circle::Circle( double r, int a, int b ) : Point( a, b )
The second line:
(A) Invokes the Point constructor with values a and b.
(B) Causes a compiler error.
(C) Is unnecessary because the Point constructor is called automatically.
(D) Indicates inheritance.
8. Which of the following assignments would be a compilation error?
(A) Assigning the address of a base-class object to a base-class pointer.
(B) Assigning the add
您可能关注的文档
- 美丽乡村施工方案..docx
- 罩蚀退火机组工艺技术规程3DDQ.doc
- 羊毛丝光柔软平滑剂的研制.doc
- 美元霸权背景下如何约束美元基于能源计价结算货币多元化角度的探讨第5稿.docx
- 美人防doc砼施工专项方案.doc
- 美加澳港口国检查的要点和体会.doc
- 基于负反馈原理的动力锂离子电池组管理系统研究----李练兵.doc
- 置换通风-地板供冷复合空调系统的模拟研究.doc
- 美丽乡村建设规划设计编制导则..docx
- 基坑土石方开挖施工方案.doc
- 大班语言活动教案汇编15篇.docx
- 我区助残基地积极带动残疾人创业致富的主要做法.doc
- 广东省佛山市顺德区八年级历史下学期期末考试试题新人教版.pdf
- 我区助残基地积极带动残疾人创业致富的主要做法.doc
- 广西2020年幼儿园中班(下册)期中检测试卷(含答案).doc
- 第16课 两次鸦片战争 同步练习-2024-2023高中历史统编版()必修中外历要上册(1).docx
- 2.4.1《喜看稻菽千重浪--记首届国家最高科技奖获得者袁隆平》同步 练习(原卷版)[001].docx
- 第6讲 正误判断题解题方法与技巧(学生版)[001].docx
- 第5讲 事实细节题解题方法与技巧(教师版).docx
- 11 A受迫振动 共振 基础版.docx
1亿VIP精品文档
相关文档
最近下载
- jmp官方中文教程系列-使用jmp.pdf
- 粤教版综合实践活动五下第三单元《小小银行家》第二课时课件.pptx
- 关于梅花鹿产业发展情况的调研报告.docx
- 2024年春江苏开放大学电工电子技术及应用形成性考核作业1答案.docx
- 在线网课学堂《现代美学》单元考核测试答案.docx
- 2024年中考道德与法治刷题模拟试卷4(Word版,含答案).doc VIP
- 未来学校读书分享.ppt
- 三菱电梯LEHY3菱云3电路图纸电气原理图纸.pdf
- ANSI ASHRAE 15-2019 制冷系统安全标准 Safety Standard forRefrigeration Systems.pdf
- 2023年河南艺术职业学院单招语文考试题库及答案解析.docx
文档评论(0)