New course! Every coder should learn Generative AI!
Try a free lesson0
so \n and endl are same?
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 .
0
they both do the same function?