What is escape sequence? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is escape sequence?

4th Feb 2020, 3:50 PM
Nirmal Viswajith
Nirmal Viswajith - avatar
3 Answers
+ 11
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.
4th Feb 2020, 5:57 PM
SHADOW 🌀
SHADOW 🌀 - avatar
+ 4
its when a certain character escape their fate, and become something else. like n. "n" is just n, simple ordinary n. once you give them the sacred sword of backslash, n can escape its fate, and found a new life as a newline character. look at it proudly holding the sword as newline character "\n". ok, enough of a tale of n for now. and see what the other say. https://www.sololearn.com/discuss/1516843/?ref=app https://www.sololearn.com/discuss/1685084/?ref=app https://www.sololearn.com/discuss/478423/?ref=app https://www.sololearn.com/discuss/1921614/?ref=app https://www.sololearn.com/discuss/1734936/?ref=app
4th Feb 2020, 3:57 PM
Taste
Taste - avatar
+ 2
An escape sequence is nothing but a special character which is preceded by a backslash '\'. This is understood by the compiler at compilation time and it assigns the special character it's function.
4th Feb 2020, 3:59 PM
Avinesh
Avinesh - avatar