Multiple choice technology programming languages

How is dynamic binding achieved in C++?

  1. Using virtual functions

  2. Using method overloading

  3. Using operator overloading

  4. Using both method & operator overloading

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Dynamic binding (also called runtime polymorphism) in C++ is achieved through virtual functions. When a function is declared virtual, the compiler creates a vtable (virtual table) for the class, and function calls are resolved at runtime based on the actual object type rather than the pointer/reference type. Method overloading and operator overloading are compile-time polymorphism (static binding), not dynamic.