0
What is the difference between endl and \n ?
4 ответов
+ 2
they both are same but with a minor difference
cout<<endl ; will do same as
cout<<"\n"<<flush;
flush is used to clear the buffer.
+ 1
they do the same thing. \n must be within the quotation marks
cout << "Hi\n";
using endl will be separate
cout << "Hi" << endl;
0
Thank you But Better to we can use newline, Because it's reliable for programming..!
0
Thank you !