I have C code like this:
#include<stdio.h>
int main()
{
printf("Hey this is my first hello world \r");
return 0;
}
I conducted an experiment using the r escape sequence.
I get the following output when I execute the code:
o world
Why is that, and what does r actually do?
If I use an online compiler to run the same code, I get the following results:
Hey this is my first hello world
Why did the online compiler ignore the \r and create different output?