What is the difference between carriage return and newline
\n
printf("Hello\n");
output - Cursor is in the next line
Hello
|
printf("Hello\r");
output - Cursor is at start of current line
|Hello
Extra reading:
References:
\n
printf("Hello\n");
output - Cursor is in the next line
Hello
|
printf("Hello\r");
output - Cursor is at start of current line
|Hello
Extra reading:
References: