If for the following code:
printf(\"HEllo\\n\"); // do not change this line.
printf(\"\\b\\bworld\");
I need an output: Helloworld (In a
Remove "\n" from your first printf. It moves the cursor to a new line.
Here is the list of escape sequences.
If you can't remove "\n", then you can do make a copy of a substring without these charaters. See the following example:
const char* from = "12345678";
char *to = (char*) malloc(6);
strncpy(to, from+2, 5);
All you need is to determine the index of "\n" characters.