English

______ is a mechanism to achieve run time polymorphism. - Computer Science 1

Advertisements
Advertisements

Question

______ is a mechanism to achieve run time polymorphism. 

Options

  • Operator Overloading

  • Virtual Function

  • Function Overloading

  • Constructor

MCQ
Fill in the Blanks

Solution

Virtual Function is a mechanism to achieve run time polymorphism. 

Explanation:

Runtime polymorphism can be achieved in object-oriented programming (OOP) through the use of virtual functions. A vtable (virtual table) is used at runtime to resolve the function call when a base class designates a function as virtual, allowing derived classes to override the function. 

shaalaa.com
  Is there an error in this question or solution?
2023-2024 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×