Character Output in C

Level 134 keystrokes

Outputs characters using printf with %c format and putchar function.

C code

// %c is the format specifier for a single character
// 'A' is a character literal enclosed in single quotes
1printf("%c\n", 'A');
// putchar prints one character and adds no newline, so B ends the output
2putchar('B');

Output

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

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

More C examples at level 1

← C typing practice