Question 121
Which of the following statements are true regarding C++?
(a) Overloading gives the capability to an existing operator to operate on other data types.
(b) Inheritance in object oriented programming provides support to reusability.
(c) When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.
(d) Overloading is a type of polymorphism.
Choose the correct option from those given below :
Answer : (a) Overloading gives the capability to an existing operator to operate on other data types.
(b) Inheritance in object oriented programming provides support to reusability.
(c) When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.
(d) Overloading is a type of polymorphism.
Choose the correct option from those given below :
Previous | Next |
UGC NET CS December 2019 - Question 120 | UGC NET CS December 2019 - Question 122 |
2 important points Order of Constructor Call with Inheritance in C++
-
Whether derived class's default constructor is called or parameterised is called, base class's default constructor is always called inside them.
-
To call base class's parameterised constructor inside derived class's parameterised constructor, we must mention it explicitly while declaring derived class's parameterized constructor.
So, option 3 is correct answer