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

Question: 1 / 565

What happens if a derived class function does not override a virtual function from its base class?

A compilation error

The base class function is used

If a derived class function does not override a virtual function from its base class, the base class function is used. Virtual functions allow for polymorphism, where the same function can behave differently based on the type of object calling it. By not overriding the virtual function, the derived class is essentially inheriting and using the implementation from the base class. Hence, the correct answer is B.

Get further explanation with Examzify DeepDiveBeta

The program crashes at runtime

The derived class function becomes abstract

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy