LearnFrenzy
Sign in Take a free test

Polymorphism and Virtual Functions · Polymorphism MCQ · Question 2

Which is compile-time polymorphism? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 2 Back to Exercise

Which of these is an example of compile-time polymorphism?

  • A A virtual function override
  • B Function overloading and templates Correct
  • C dynamic_cast
  • D A virtual destructor
Correct Answer: Option B

The compiler chooses the overload or template instantiation; nothing is decided at run time.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links