Size of Char in C++

Level 129 keystrokes

Prints the size of the char type in bytes, which is always 1.

C++ code

// sizeof measures sizes in units of char
// So sizeof(char) is 1 by definition, on every platform
1cout << sizeof(char) << 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
  • ;× 1
  • (× 1
  • )× 1

More C++ examples at level 1

← C++ typing practice