Multiple choice technology programming languages

What does the code "cout<<(0==0);" print?

  1. 0

  2. 1

  3. Compiler error: Lvalue required

  4. Don't Know

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The comparison (0==0) evaluates to true (1), which is then printed by cout. True boolean values are represented as 1 in C++ output streams.