C Escape Characters: Functions Explained

In C language, escape characters are used to represent special characters such as newline, tab, carriage return, etc. The common escape characters and their functions are as follows:

  1. \n: newline character
  2. tab: tabulation character
  3. Carriage return character
  4. \b: Backspace character
  5. f: page break
  6. \ : backslash
  7. – ‘Replace the double quotation marks with single quotation marks.’
  8. Colon: Quotation marks
  9. Null character
  10. \a: Ringtone symbol
  11. \v: Vertical tabulation symbol

These escape characters can be used in string constants, character constants, and character arrays to represent special characters or implement specific functions.

bannerAds