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:
- \n: newline character
- tab: tabulation character
- Carriage return character
- \b: Backspace character
- f: page break
- \ : backslash
- – ‘Replace the double quotation marks with single quotation marks.’
- Colon: Quotation marks
- Null character
- \a: Ringtone symbol
- \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.