Object Oriented Programming with C Plus Plus - Multiple Choice Questions. 001

Object Oriented Programming with C Plus Plus - Multiple Choice Questions.

1. A _______________ is an instance of class.
A. code.
B. object.
C. variable.
D. pointer.
ANSWER: B
2. _________ is an example for Monolithic programming.
A. Java.
B. BASIC.
C. FORTRAN.
D. PASCAL.
ANSWER: B
3. ______is the fundamental building block of object oriented programming language.
A. Module.
B. Code.
C. Object.
D. Function.
ANSWER: C
4. ___________ is one of the way to achieve polymorphism.
A. Inheritance.
B. Data overloading.
C. Operator overloading.
D. Message binding.
ANSWER: C
5. Inline is a _________________.
A. variable.
B. object.
C. keyword.
D. class.
ANSWER: C
6. OOP language supports object based features, inheritance and ______________.
A. Encapsulation.
B. Polymorphism.
C. Object identity.
D. Functions.
ANSWER: B
7. Public, private, protected are ______.
A. identifiers.
B. data members.
C. access specifies.
D. type of class
ANSWER: C
8. The ______ access specifies allows functions or data to be accessible to other parts of the program.
A. private.
B. protected.
C. public.
D. inherited.
ANSWER: C
9. The variable myNum has the value 5. How to print a variable to the screen?
A. cout<< "My number is", myNum << endl;.
B. cout<< "My number is 5" << endl;.
C. cout<< My number is << myNum << endl;.
D. cout<< "My number is" << myNum << endl;.
ANSWER: D
10. _______ operator links a class to a member.
A. ::
B. .
C. ->
D. *
ANSWER: A

No comments:

Post a Comment