so \n and endl are same? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

so \n and endl are same?

5th Jul 2016, 5:37 PM
Farhan S
Farhan S - avatar
2 Answers
+ 2
endl is more efficient than \n ,as after each execution endl will flush the output buffer and programs run faster in endl. Basically speaking they just output a new line .
5th Jul 2016, 5:44 PM
Aditya Pai
Aditya Pai - avatar
0
they both do the same function?
5th Jul 2016, 5:45 PM
Farhan S
Farhan S - avatar