Question 16Asked in UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)

In C++, polymorphism requires :

  1. AInheritance only
  2. BVirtual functions only
  3. CReferences only
  4. DInheritance, Virtual functions and references
Show answerHide answer

Correct answer: (D) Inheritance, Virtual functions and references

Explanation

Basically polymorphism means having many forms. In C++, polymorphism requires Inheritance, Virtual functions and references, because polymorphism occurs when there is a hierarchy of classes and they are related by inheritance which include virtual functions and references.

From UGC NET Computer Science PYQ, August 2016 (Paper II & III, Selected Questions)

This is question 16 of UGC NET Computer Science PYQ, August 2016 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.