Escaping characters problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Escaping characters problem

Here I was playing with different letters instead of "\n" and "\t" and found some letters that work pretty interesting, ("\a", "\b", "\v") which add a space in the text and "\r" which just escapes the letter 'r', unlike adding any other wrong letter after '\'. Can anyone explain them to me? It would be highly appreciated.

20th Mar 2018, 10:12 PM
Andrei Cereanu
Andrei Cereanu - avatar
2 Answers
+ 2
You don't need to invent a bicycle. Some escape sequences won't work in SoloLearn output console due to restrictions (like \r, which is a carriage return).
20th Mar 2018, 10:34 PM
strawdog - avatar
+ 1
Thanks @Maxim Zinyakov didn't think of that...
21st Mar 2018, 5:15 AM
Andrei Cereanu
Andrei Cereanu - avatar