Loading...

C++ Multiple Choice Questions

Our C++ questions and answers focuses on all areas of C++ programming language covering 100+ topics in C++

C++ OOPs Concepts MCQ | Set 2

C++ OOPs Concepts | Set 2


11. Which of the following class allows to declare only one object of it?

a) Abstract class
b) Virtual class
c) Singleton class
d) Friend class



12. Which of the following is not a type of Constructor?

a) Friend constructor
b) Copy constructor
c) Default constructor
d) Parameterized constructor



13. Which of the following is correct?

a) Base class pointer object cannot point to a derived class object
b) Derived class pointer object cannot point to a base class object
c) A derived class cannot have pointer objects
d) A base class cannot have pointer objects



14. Out of the following, which is not a member of the class?

a) Static function
b) Friend function
c) Constant function
d) Virtual function



15. What is the other name used for functions inside a class?

a) Member variables
b) Member functions
c) Class functions
d) Class variables



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



- Related Topics