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

Question: 1 / 565

What happens if you try to make an object of an abstract class?

The compiler prevents it

An abstract class cannot be instantiated, so attempting to create an object of an abstract class will result in a compilation error. This is because an abstract class is incomplete and contains abstract methods that must be implemented in a subclass. Option B and C are incorrect as there is no default behavior for making an object of an abstract class and it cannot be created successfully. Option D is incorrect as a run-time error only occurs when the code is running, but in this case, the error would be caught by the compiler.

Get further explanation with Examzify DeepDiveBeta

The object is made with default values

The object is created successfully

Run-time error occurs

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy