What are the escape characters in the C programming language?

Common escape characters in the C language include:

  1. \n: new line character
  2. Tab: Tabulation character
  3. \r: carriage return
  4. \b is the backspace character.
  5. \f: Page break.
  6. Backslash
  7. ‘ : “
  8. – quotation marks
  9. 0: Null character (end marker for strings)
  10. \xhh: A hexadecimal character, where hh represents a two-digit hexadecimal number.
  11. \ooo: Octal character, where ooo is a three-digit octal number.

These escape characters can be used in a string to represent certain special characters. For example, using \n can insert a newline character in the string. Using \ can insert a backslash in the string.

bannerAds