Character Output in C++

Level 120 keystrokes

Prints the single character 'A', written as a char literal in single quotes.

C++ code

// Single quotes make a char literal holding exactly one character
// cout prints a char as the character itself, not as a number
1cout << 'A' << endl;

Output

A
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

More C++ examples at level 1

← C++ typing practice