Integer to Character in C

Level 125 keystrokes

Converts ASCII value 66 to character 'B' and outputs it.

C code

// (char) casts an integer to a character type
// ASCII 66 corresponds to the character 'B'
1printf("%c\n", (char)66);

Output

B
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.

  • "× 2
  • (× 2
  • )× 2
  • ,× 1
  • ;× 1
  • \× 1
  • %× 1

More C examples at level 1

← C typing practice