+ 2
Difference between "\n" and "endl"!?
I want to know where is the difference between this two cause they work exactly the same.
7 Réponses
+ 18
Both works as a enter key...
But endl flushes the output buffer and \n doesn't ...
In short endl is slower than \n...
so if u r writing a very lengthy code of million lines use \n instead of endl...
+ 8
no difference, they do exactly same thing...
+ 1
if they do the same thing then why to create more X)
+ 1
they both are same
0
\n is used in c and endl is used in c++
0
both used for new line(enter key).
but in c,there is \n and in c++,endl.
0
endl work as "the line is end" & \n work as a "new line"