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 keyword is used to inherit a class in C++?

  1. inherits

  2. extends

  3. implements

  4. public

The correct answer is: public

The "public" keyword is used to define a publicly inherited class in C++. The other options are incorrect for the following reasons - "inherits" is not a keyword in C++, it is a common programming term used to describe the action of creating a class that inherits from another class. - "extends" is a keyword used in Java for inheritance, but it is not used in C++. - "implements" is a keyword used in Java for implementing interfaces, but it is not used in C++.