警示 《中山大学授予学士学位工作细则》第六条 ***不授予学士学位 计算机科学系 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