Escape Sequence in C++

Level 128 keystrokes

Prints "Hi" and "World" separated by a tab character.

C++ code

// \t inside a string literal is the escape sequence for a horizontal tab
// The output is Hi, a tab, then World
1cout << "Hi\tWorld" << endl;

Output

Hi	World
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

More C++ examples at level 1

← C++ typing practice