ACtE03 · Chapter 3Programming & Applications🏛️ Past Licensure QuestionID: 3901d3c7
Late binding (dynamic polymorphism / runtime dispatch) is achieved in C++ by using:
Late binding (dynamic polymorphism / runtime dispatch) is achieved in C++ by using:
Multiple Choice Options
- A
Static member variables
- B✓ Correct Option
Virtual functions
- C
Inline functions
- D
Constant member functions
Detailed Technical Solution & Explanation
Late binding means the method implementation to execute is determined at runtime rather than compile time. In C++, this is implemented through virtual functions using virtual method tables (vtables) and vpointers.
Option Analysis:
•
Option A (Static member variables): Shared class-level state resolved at compile/link time.
•
Option B (Virtual functions): Correct. Declaring a method
virtual enables dynamic dispatch and late binding.•
Option C (Inline functions): Expanded directly at the call site at compile time (early binding).
•
Option D (Constant member functions): Restricts modification of object state; unrelated to late binding.
Reference: Demo2 · Set 1NEC Licensure Syllabus