a) Using Inheritance b) Using Virtual functions c) Using Templates d) Using Inheritance and Virtual functions Answer: ...
View QuestionHow run-time polymorphisms are implemented in C++?
a) Using Inheritance b) Using Virtual functions c) Using Templates d) Using Inheritance and Virtual functions Answer: d Explanation: ...
View QuestionHow many types of polymorphism are there in C++?
a) 1 b) 2 c) 3 d) 4 Answer: b Explanation: There are two types of polymorphism ...
View QuestionWhich 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 Answer: b Explanation: The concept of using objects of ...
View QuestionWhy references are different from pointers?
a) A reference cannot be made null b) A reference cannot be changed once initialized c) No extra operator ...
View QuestionWhich of the following cannot be a friend?
a) Function b) Class c) Object d) Operator function Answer: c Explanation: Objects of ...
View QuestionWhat is the other name used for functions inside a class?
a) Member variables b) Member functions c) Class functions d) Class variables Answer: b Explanation: Functions ...
View QuestionOut of the following, which is not a member of the class?
a) Static function b) Friend function c) Constant function d) Virtual function Answer: b Explanation: Friend function is not ...
View QuestionWhich of the following is correct?
a) Base class pointer object cannot point to a derived class object b) Derived class pointer object cannot ...
View QuestionWhich of the following is not a type of Constructor?
a) Friend constructor b) Copy constructor c) Default constructor d) Parameterized constructor Answer: a Explanation: Friend function is ...
View Question