下载此文档

2013级中山大学信息科学与技术学院计算机科学系《c 程序设计二》期末试卷b及答案.pdf


文档分类:高等教育 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
警示
《中山大学授予学士学位工作细则》第六条
***不授予学士学位
计算机科学系 2014 学年度第二学期
《程序设计 II 》期末考试试题( B )
任课教师: 吴维刚刘聪考试形式: 闭卷考试时间: 2 小时
年级: 班别: 专业: 姓名: _____ 学号: _成绩
1. Single Choice (20points)
Please choose the choice that pletes the statements in the question
1) Which of the following statements about object-oriented programming (OOP) is NOT correct?
A) The key idea of OOP is to build programs using software object.
B) OOP offers many advantages: simplicity, modularity, modifiability, and so on.
C) OOP is more efficient than POP in terms of programming productivity.
D) An object-oriented program can run faster than a procedure-oriented program with the same
functionality.
2) Which of the following statements about static data members is NOT correct?
A) A static data member can initialized at declaration.
B) A static data member refers to a member whose value cannot be changed after initialized.
C) We may access static data members without before any object created.
D) A static data member is shared by objects of the same class.
3) Which of the following variables cannot be a member of class A?
A) A *p B) A a C) A &r D) string s
4) Which of the following statements is not a characteristic of a constructor?
A) The name of a constructor must be the same as the class.
B) A constructor can be overloaded.
C) The parameters of constructor may have default values.
D) The return type of a constructor must be "void".
5) If C is a class name, how many times is the constructor of C called in "C a, b[2], *p[2];"?
A) 2 B) 3 C) 4 D) 5
6) If p is a pointer to an object with a member function x(), which of the following access to x() is
correct?
A) * B) p->x() C) *p->x() D) *()
1
7) Which of the following is NOT a member function of a class?
A) constructor B) destructor C) friend function D) copy constructor
8) If class X is declared to be the friend of a class Y, then which of the following statements is
correct?
A) Y can access the protect

2013级中山大学信息科学与技术学院计算机科学系《c 程序设计二》期末试卷b及答案 来自淘豆网www.taodocs.com转载请标明出处.