Question 184Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 2 (12:30 PM)

What feature of OOP allows an instance of a class to take on many forms?

  1. AOperator overriding
  2. BMultiple inheritance
  3. CNested class
  4. DOperator overloading
Show answerHide answer

Correct answer: (D) Operator overloading

Explanation

The ability to take many forms is polymorphism. Operator overloading is a form of compile-time polymorphism, where one operator behaves differently for different types, which is why it is the keyed option.

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 2 (12:30 PM)

This is question 184 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 2 (12:30 PM). 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.