Which feature of OOP allows the same interface to represent different underlying implementations?

Options

  • A. Encapsulation
  • B. Polymorphism
  • C. Data hiding
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Polymorphism

Detailed Explanation

Correct Answer: Option B

Explanation:
Polymorphism means many forms. In C++, it can be achieved through compile-time mechanisms such as function overloading and runtime mechanisms such as virtual functions and overriding.