How many types of polymorphisms are supported by C++?

2022

How many types of polymorphisms are supported by C++?

  1. A.

    1

  2. B.

    2

  3. C.

    3

  4. D.

    4

Attempted by 297 students.

Show answer & explanation

Correct answer: B

C++ supports two main types of polymorphism:

1. Compile-time (static) polymorphism: The function or operation to be executed is decided during compilation. Examples include function overloading, operator overloading, and templates.

2. Run-time (dynamic) polymorphism: The function to be executed is decided during program execution. This is achieved using inheritance and virtual functions.

Therefore, the correct answer is 2.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs