What is the meaning of escape characters in C language?
Escape characters in the C language refer to special character sequences used to represent characters that cannot be entered or displayed directly. These escape characters typically begin with a backslash (\) followed by one or more characters. Common escape characters in the C language include:
- \n: line break character
- – Tab: tabulation character
- Carriage return
- \b: backspace character
- \f: Page break
- \a: ringing symbol
- /
Backslash
- ‘ – single quotation marks
- Quotation marks
- Question mark
- \0: signifies the end of a string
- \xhh: represents a two-digit hexadecimal number, used to denote the ASCII code value of the character hh.
By using escape characters, we can insert special characters in a string or display some characters that cannot be directly inputted in the output. For example, using \n as an escape character can insert a new line in a string, while using \t can insert a tab.