All mock tests are FREE till 31 December — register to save your progress

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.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. (a), (b) and (d) only

Explanation

Overloading extends operators to new types and is a form of polymorphism; inheritance supports reuse. The base constructor runs before the derived one, so (c) is false.

More Programming Languages and Computer Graphics questions