C++ MCQ’s

C++ MCQ’s Home Page

C++ Basic 1
C++ Basic 2
C++ Basic 3
C++ Basic 4
C++ Basic 5
C++ OOPs Concepts 1
C++ OOPs Concepts 2
C++ OOPs Concepts 3
C++ OOPs Concepts 4
C++ OOPs Concepts 5

 

C++ Language MCQ’S | OOPs Concepts Set 1

16.
Which of the following cannot be a friend?

a) Function
b) Class
c) Object
d) Operator function

17.
Why references are different from pointers?

a) A reference cannot be made null
b) A reference cannot be changed once initialized
c) No extra operator is needed for dereferencing of a reference
d) All of the mentioned

18.
Which of the following provides a programmer with the facility of using object of a class inside other classes?

a) Inheritance
b) Composition
c) Abstraction
d) Encapsulation

19.
How many types of polymorphism are there in C++?

a) 1
b) 2
c) 3
d) 4

20.
How run-time polymorphisms are implemented in C++?

a) Using Inheritance
b) Using Virtual functions
c) Using Templates
d) Using Inheritance and Virtual functions