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

Get more with Examzify Plus

Remove ads, unlock favorites, save progress, and access premium tools across devices.

FavoritesSave progressAd-free
From $9.99Learn more

1 / 565

What must happen if a pure virtual function is not overridden in a derived class?

The derived class becomes abstract

When a pure virtual function is not overridden in a derived class, the derived class inherits the pure virtual function from its base class. Since the derived class does not provide an implementation for the pure virtual function, the derived class itself becomes an abstract class and cannot be instantiated. This means that any attempt to create an object of the derived class will result in a compilation error. Additionally, if the derived class is not made abstract by providing implementations for the pure virtual function, it will result in a run-time error when the program tries to access the pure virtual function through an object of the derived class. Therefore, the only correct option is A.

Get further explanation with Examzify DeepDiveBeta

Compilation error

Run-time error

The derived class is fine as is

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy