0
Why only one backslash is getting printed? And when I try to put only one backslash in the 2nd elrment of array, I get an error.
3 ответов
+ 1
Backslash is supposed to be a terminating character in programming.
Anything after that will have another meaning:
For example \n will add a new line, also the n will not be displayed.
Same happens here
\\ the first backslash removes the second backslash like in the above example. There is no actual use of this like that of \n.
+ 1
Oh! now i see.
Thanks
0
Backslash is special characters used in escape sequence. So to put you need '\\' like this,..
On encountering \, compiler treats that a special characters and it works as on depending on the next charecter..
Ex: \n =>new line \t =>tab, \\ =>backslash