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

Question: 1 / 565

What is a key feature of object-oriented programming that allows for code reuse?

Conditional Statements

Inheritance & Composition

Inheritance & Composition is a key feature of object-oriented programming (OOP) that enables the reuse of code. Both concepts allow for the creation of new classes based on existing ones, allowing the new classes to inherit properties and methods from the parent class. This means that developers do not need to write new code from scratch, saving time and effort. Conditional statements, loops, and preprocessor directives are all important concepts in programming, but they are not specific to OOP and do not directly facilitate code reuse. Therefore, they are not the correct answer to this question.

Get further explanation with Examzify DeepDiveBeta

Loops

Preprocessor Directives

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy