Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++'

Disable ads (and more) with a membership for a one time $2.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What describes the 'is-a' relationship in C++?

  1. Association

  2. Composition

  3. Inheritance

  4. Linkage

The correct answer is: Inheritance

The 'is-a' relationship in C++ refers to the relationship between a base and derived class where the derived class inherits data and behavior from the base class. This allows the derived class to use and extend the functionality of the base class. Association (option A) is a relationship where two classes are connected, but one does not inherit from the other. Composition (option B) is a relationship where one class contains an instance of another class. Linkage (option D) refers to how different parts of a program connect and interact with each other, and is not related to the 'is-a' relationship. Therefore, C is the correct answer because it describes the specific type of relationship in C++.