Please help why we use this symbol "\" | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Please help why we use this symbol "\"

I try it into string but it gone wrong please describe how string works. It is a big isssu for me. Help me frnds

7th Mar 2020, 4:06 AM
Smart Niraj Singh
2 Respostas
+ 2
It's uses differs according to your language . Generally it is used to print special character like(',",%,/,& etc) cause when you use these character in print function It has other meaning Like if you want to print( "hello world") with colon You will face problems Ex if your syntax ish Printf(""hello world""); It will result error So the syntax will be Printf("\" hello world \" ") Thats why it is used
7th Mar 2020, 5:00 AM
Aman Vashishtha
Aman Vashishtha - avatar
+ 1
Smart Niraj Singh ,hi I think you talk about the escape character, you could do a search on it. It is used to specify in a string not to interpret the caracter just after, for example \n will induce a line break and there are some others rules or examples why to use it before a particular caracter. But it is called "escape caracter" if you look for more complete explanation.
7th Mar 2020, 4:19 AM
EmmanueLZ.
EmmanueLZ. - avatar