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 is true about the relationship between a derived class and its base class?

  1. The derived class cannot add new methods

  2. The derived class has a different type than the base class

  3. The derived class can receive all messages the base class can

  4. The derived class does not inherit properties from the base class

The correct answer is: The derived class can receive all messages the base class can

A derived class is a class that is created from an existing (or base) class. This means that it inherits all of the methods and properties of the base class. Option A is incorrect because a derived class can add new methods in addition to inheriting methods from the base class. Option B is incorrect because a derived class does not have a different type than the base class - it is a specialized version of the base class. Option D is incorrect because a derived class does inherit properties from the base class. Therefore, the correct answer is C the derived class can receive all messages (methods) from the base class.