Common C Escape Sequences - dummies

By Dan Gookin

Part of Beginning C Programming For Dummies Cheat Sheet

When you cannot type characters into your string, use the escape sequences to insert nonprintable characters into text strings, char variables, and arrays. Here are common C escape sequences:

Characters What It Represents or Displays
a Bell (“beep!”)
b Backspace, non-erasing
f Form feed or clear the screen
n Newline
r Carriage return
t Tab
v Vertical tab
\ Backslash character
? Question mark
Single quote