I want the output of the following code as
-|-2-|-
(When i input the value of key as 2). I know \b just move the cursor to 1 space back but why it isn't able to move one space back after a newline is used to input the value of key. Is it possible to use the escape character \b after a newline character has been used.
#include<stdio.h>
#include<conio.h>
int main()
{
int key;
printf("Enter value of key: )"
printf("-|-");
scanf("%d",&key);
printf("\b-|-");
return 0;
}