Mastering C++: 2026 All-In-One Quiz – Ace 'Thinking in C++' with Comprehensive Practice!

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

When is it suitable to use public inheritance?

When creating a completely new class

When specializing a class

Public inheritance is suitable when you want to create a class that is a more specialized version of another class. This means that the new class inherits the properties and behaviors of the base class, but also adds its own unique features. Option A is incorrect because you would use public inheritance when creating a more specialized version of an existing class, not a completely new one. Option C is incorrect because it mentions modifying a base class, which is not the purpose of public inheritance. Option D is incorrect because public inheritance is used to create a relationship between related classes, not unrelated ones.

Get further explanation with Examzify DeepDiveBeta

When modifying a base class to create a generic class

When building unrelated classes

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy