Why \" is the answer can anyone explain? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why \" is the answer can anyone explain?

6th May 2018, 7:13 AM
Vinay Babu
3 Answers
+ 1
I don't know on which question you refer, but \ is a escape character, allowing you to write chars, that would usually affect the syntax of your code. For example writing 123" wouldn't work because the syntax is like "123"", so it would stop at the first " printing just 123. Using \ helps you: 123\" will print the correct result
6th May 2018, 7:30 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
0
Because when you are in a double quoted string if you want to include a " in it you need to escape so the string will not end at the second " but at the third. \ allows to escape the String
6th May 2018, 7:26 AM
Marie
0
tanqqq frnds
6th May 2018, 7:32 AM
Vinay Babu