What is meaning of backslash in string | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What is meaning of backslash in string

Explain how to use backslash in coding

12th Dec 2019, 9:39 AM
Shardul Malkhare
Shardul Malkhare - avatar
2 Respostas
+ 3
it's used to represent escape sequences. https://en.m.wikipedia.org/wiki/Escape_sequences_in_C change tags. remove "about".
12th Dec 2019, 9:43 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
0
It's used as an escape character. Some letters have special use and some dont. For example, \n is special, as it makes a new line. Although, it's called an escape character because some character's can be used prior to their usual behaviour. For example, this string is completely fine: "Welcome to: \"CodingLand\"" and it means: Welcome to: "CodingLand", although theres quotes inside quotes.
12th Dec 2019, 9:54 AM
coddy
coddy - avatar