面向对象程序设计(C++)(双语).doc

  1. 1、本文档共20页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
江西财经大学 06-07学年第一学期期末考试试卷 试卷代码: 03874B 课时: 64学时 课程名称:面向对象程序设计(C++)(双语) 适用对象:05级信管、信计 一、Single-Choice (Every question is 2 point, total is 32 point) 1、( ) has the same function as the sentence: printf(“Hello world\n”) in C language. A. cout”Hello world\n” B. cin”Hello world\n” C. cout”Hello world\n” D. cin”Hello world\n” 2、The result of the program is ( ). #include iostream.h double f(double x, int n) { double val = 1.0; while (n--) val = val*x; return(val); } void main(void) { cout f(5,2) endl; } A. 10 B. 7 C. 25 D. 3 3、For pointers, ( ) is not right. A. int i; int* ptr=i B. int i; int *ptr; i=*ptr C. int *ptr; ptr=0 D. int i=5; int *ptr; *ptr=i 4、In the following functions, ( ) can not be overloaded. A. Common member functions B. Common non-member functions C. Destructor              D. Constructor 5、After executing the following program, ( ) is the result. #includeiostream.h void Swap(int a, int b) { int t; t=a; a=b; b=t; } int main() { int x=5, y=10; Swap(x,y); coutx=x y=yendl; return 0; } A. x=5 y=10 B. x=10 y=5 C. x=5 y=5 D. x=10 y=10 6、If a derived class is gained from a base class by private inherit, the private and public members in the base class will become ( ) members for derived class. A. ?public??? B. private?????? C. protected?????????????D. friend 7、For operator overloading, ( ) is correct. A. The number of operands can be changed B. The priority for operators can be changed C. The syntax for operators can’t be changed D. The combination sequence can be changed 8、( ) is not right for the description of class. Class is a user defined type The private members can be accessed by friend functions in class In class, without declaration the member data are private In class, without declaration the member functions are public 9、Given a class MyClass, after executing the sentence: MyClass a, b,

文档评论(0)

***** + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档