Ace Your C++ Skills 2025 – Rock the ‘Thinking in C++’ Challenge!

Question: 1 / 565

What do virtual functions enable in C++?

Early binding

Late binding

Virtual functions enable late binding in C++. This means that the function to be executed is determined at runtime based on the type of the object it is invoked on, rather than at compile time.

Option A is incorrect because early binding refers to the decision being made at compile time, which is not the case for virtual functions. Option C is incorrect because static typing is a characteristic of languages like Java and C#, and is not directly related to virtual functions in C++. Option D is incorrect because compile-time polymorphism, or method overloading, is a feature of the language that enables functions with the same name to be called with different arguments. This is different from the behavior of virtual functions.

Get further explanation with Examzify DeepDiveBeta

Static typing

Compile-time polymorphism

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy