What is the difference between carriage return and newline?
Printable View
What is the difference between carriage return and newline?
\n is in fact the combination of carriage return and line feed; so that you go to the beginning og the next line
Thanks but then what is the function of \r - carriage return?
Printf ( " sss \r ddd");
This line prints just ddd. why?
The carriage return will return the cursor to the leftmost position without going to the next line. Obviously your sss is overwritten by ddd