+ 1

What is the difference between endl and the manual enter button?

I know that endl creates a line break, but so does manually pressing the enter button. Does one take less space in the coding to use/compute than the other? Or does it not technically matter which one you use?

13th Feb 2022, 7:39 PM
Ryan Reaper
4 Respuestas
13th Feb 2022, 8:01 PM
Jayakrishna 🇮🇳
+ 1
endl in an instruction to compiler for execution. pressing enter is your typing character. It's like difference between writing and executing... is not it ?
13th Feb 2022, 7:57 PM
Jayakrishna 🇮🇳
+ 1
You are right. I got confused, sorry 😅 I meant the difference between \n and endl - these are the two linebreakers right?
13th Feb 2022, 7:59 PM
Ryan Reaper
+ 1
Thank you! 😊
13th Feb 2022, 8:03 PM
Ryan Reaper