Why not able to print \ using this line of code | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

Why not able to print \ using this line of code

cout<< hello<< \ n << world; output is hello n world

22nd Jun 2018, 2:35 PM
Ashwini Kumar
Ashwini Kumar - avatar
5 Respuestas
22nd Jun 2018, 2:47 PM
Nitish kumar jha
Nitish kumar jha - avatar
+ 1
how to use ASCII value
22nd Jun 2018, 3:16 PM
Ashwini Kumar
Ashwini Kumar - avatar
+ 1
code is modify how to use ASCII value: https://code.sololearn.com/ck5yXhiaGbW8/?ref=app
22nd Jun 2018, 3:32 PM
Nitish kumar jha
Nitish kumar jha - avatar
0
cout<< "hello\"world\"";
22nd Jun 2018, 3:49 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
0
\ is a weird thing. \n is used as next line so cout<<"hi\nbro<<; would be hi bro when you do a \ it exspects a letter after that so if there is no letter it errors out your code cout<< hello<< \ n << world; output is hello n world you have \ n it should be \n no space
9th Jul 2018, 7:49 PM
ÐɈ₷ ᵴᴛᴜᴅiᴏᶊ
ÐɈ₷ ᵴᴛᴜᴅiᴏᶊ - avatar