Escape sequences are used in the programming languages C and C++, and also in many more languages (with some variations) like Java and C#. An escape sequence is a sequence of characters that does not represent itself when used inside a character or string literal, but is translated into another character or a sequence of characters that may be difficult or impossible to represent directly.
In C, all escape sequences consist of two or more characters, the first of which is the backslash, \ (called the "Escape character"); the remaining characters determine the interpretation of the escape sequence. For example, \n is an escape sequence that denotes a newline character. The remainder of this article focuses on C; other programming languages are likely to have different syntax and semantics.