so \n and endl are same? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

so \n and endl are same?

5th Jul 2016, 5:37 PM
Farhan S
Farhan S - avatar
2 Respuestas
+ 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