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.


Which class’s 'play()' function is expected to output "Stringed::play"?

  1. Instrument

  2. Wind

  3. Brass

  4. Stringed

The correct answer is: Stringed

The other options (A, B, C) are incorrect because they either do not have a 'play()' function or they do not match the expected output "Stringed:play." Instrument and Wind do not have 'play()' functions, while Brass has a 'play()' function but outputs "Brass::play". Therefore, the correct option is Stringed as it has a 'play()' function that outputs "Stringed::play".