If for the following code:
printf(\"HEllo\\n\"); // do not change this line.
printf(\"\\b\\bworld\");
I need an output: Helloworld (In a
There is no platform-independent control character to move back up a line. This harkens back to the days of line printers, where printf actually would print a line of text onto a sheet of paper and there was no way of retracting the paper to overwrite what had already been printed.
That said, there are libraries like ncurses that let you move the cursor around the console. They're just not part of the standard libraries.