In C++, which of the following allows dynamic dispatch during runtime?

12 views
  • Function Overloading
  • Virtual Functions (Correct Answer)
  • Templates
  • Inline Functions

Explanation

Virtual functions enable runtime polymorphism in C++, allowing the program to decide which function implementation to invoke based on the actual object type, unlike overloading which is resolved at compile time.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs