I have these two pieces of code:
int main(void)
{
printf("\nab");
printf("\bsi");
printf("\rha");
return 0;
}
For the first one the output is hai
. However if I write it this way instead:
int main(void)
{
printf("\nab");
printf("\bsi");
printf("\rsha");
}
The output that results is just sha
. What's going on here? (Also I'm using gcc
)