Logical AND in C++

Level 131 keystrokes

Prints the result of true && true, which is true and shown as 1.

C++ code

// && (logical AND) is true only when both operands are true
// Both operands are true, so the result is true, printed as 1
1cout << (true && true) << endl;

Output

1
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this C++ code and how often they appear.

  • <× 4
  • &× 2
  • ;× 1
  • (× 1
  • )× 1

More C++ examples at level 1

← C++ typing practice