+ 1

Cout

can't we use \n to print in next line without using "endl"

26th Jan 2017, 12:25 PM
Kevin Jadia
Kevin Jadia - avatar
4 Réponses
+ 7
You can, but endl is recommended.
26th Jan 2017, 1:40 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Cout<<"Hello \n world ";
26th Jan 2017, 12:32 PM
Jayvardhan Deshmukh
Jayvardhan Deshmukh - avatar
+ 2
Endl is the same as '\n' and it flushes the buffer.
26th Jan 2017, 2:42 PM
Jafca
Jafca - avatar
0
which gives the out put
2nd Feb 2017, 7:38 AM
pavan kumar v