Use of \ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Use of \

Why in this example we dont need the \ before te " to print the quotation marks??

10th May 2018, 5:54 PM
Aldo Flores
2 Answers
+ 1
it would help if you could provide a link to (Or a copy of) the example you are referring to.
10th May 2018, 6:29 PM
ifl
ifl - avatar
+ 1
The \ is the escape character. Since most languages would recognize the " as the end of a string, it would cause an error. So we need to escape it in order to see it. The escape character is put at the front of the thing you're trying to escape. This basically tells the compiler to not recognize that as anything.
11th May 2018, 4:26 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar