Chapter End Quiz

Download Chapter End Quiz

Post on 12-Oct-2014




0 download

Embed Size (px)


<p>CHAPTER 1: 1.</p> <p>PRINCIPLES OF OBJECT ORIENTED PROGRAMMING</p> <p>Which of the following languages is not a pure Object-Oriented language? a) Java b) Simula c) Ada d) Eiffel Which of the languages is a pure object-oriented language? a) C++ b) Smalltalk c) Object Pascal d) Objective C Which of the following statements is TRUE with respect to object-oriented programming? a) Emphasis is on algorithms rather than data. b) Data can move freely from function to function. c) Programs are divided into small programs called functions. d) Data and functions that operate on them are tied together. Which of the following issues is considered as the major drawback of the procedure oriented programming? a) Employs tap-down approach in program design. b) Emphasis is an algorithms. c) Most of the functions share global data. d) Large programs are divided into functions. One of the major advantages of object-oriented programming approach is: a) It can easily map real-world problems. b) Data can move freely around the system. c) Any language can be used for programming. d) Structured programming concept can be easily incorporated. The wrapping up of data and functions into a single unit is known as a) Function overloading b) Static binding c) Abstraction d) Encapsulation The process by which objects of one class can acquire the attributes of objects of another class is known as a) Attribute passing b) Inheritance c) Abstraction d) Polymorphism</p> <p>2.</p> <p>3.</p> <p>4.</p> <p>5.</p> <p>6.</p> <p>7.</p> <p>8.</p> <p>Which one of the following concepts enables the reusability of code? a) Dynamic binding b) Polymorphism c) Inheritance d) Encapsulation The term function over loading refers to: a) Message passing b) Dynamic binding c) Data hiding d) Polymorphism Which of the following characteristics C++ does not support? a) Persistence b) Generacity c) Garbage collection d) Late binding Encapsulation ensures that a) any function in the program can access the data b) external functions cannot access an objects nonpublic data c) external functions cannot access any data of the object d) the data of the object is never modified A rectangle notation that is used to denote an object usually show a) communication links with other objects b) only data members of the object c) data and functions of the object d) relationship with other objects</p> <p>9.</p> <p>10.</p> <p>11.</p> <p>12.</p> <p>CHAPTER 2: 1.</p> <p>BEGINNING WITH C++</p> <p>C++ is an extension of C language. One of the new features added is: a) Structure b) Union c) Operator overloading d) Function Which of the following statements is FALSE? a) In a C++ program, the execution begins at main() function. b) Every C++ program must have a main() function. c) Every C++ statement must end with a semicolon. d) C++ does not permit the use of printf() for displaying an output. Line commands are inserted into a C++ program using a) Left and right curly brackets like {} b) Double forward slashes like //.. c) Stars and slashes like /*..*/ d) A colon like this : .. For declaring the variables a and b, which of the following declaration statements is incorrect? a) int a, b; // Declaration b) int a, /* Declaration*/ b; c) int a, // Declaration // b; d) int a, b; // Declaration // For using functions that convert numbers to text and text to numbers, we must include the following header file: a) b) c) d) Which of the following statements provide two lines of output? a) cout x &gt;&gt; y; d) cin &gt;&gt; x &gt;&gt;y; Which of the following statements requires the header file to be included? a) cout </p>