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 operator is used with cout to send data to standard output?

  1. +=

  2. <<

  3. >>

  4. ::

The correct answer is: <<

The operator used with cout to send data to standard output is the "<<" operator. This is also known as the "insertion" operator, as it inserts the data after the data already present in the output stream. The other options, such as +=, >>, and :, are not used in this context and therefore are incorrect. The += operator is used for addition assignment, the >> operator is used for input from the standard input, and the :: operator is used for scope resolution. Therefore, the correct answer is B.