Backslash Escape in C

Level 123 keystrokes

Outputs a file path with backslashes using escape sequences.

C code

// \\ is the escape sequence for one literal backslash
// So the final \\n prints a backslash and n, not a newline
1printf("C:\\Users\\n");

Output

C:\Users\n
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
  • (× 1
  • )× 1

More C examples at level 1

← C typing practice