title: What's the Use of '\r' escape sequence?
body: <p>I have C code like this:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      printf("Hey this is my first hello world \r");
      return 0;
  }
  </code></pre>
  
  <p>I have used the <code>\r</code> escape sequence as an experiment. When I run the code I get the output as:</p>
  
  <pre><code>o world
  </code></pre>
  
  <p>Why is that, and what is the use of <code>\r</code> exactly? </p>
  
  <p>If I run the same code in an online compiler I get the output as:</p>
  
  <pre><code>Hey this is my first hello world
  </code></pre>
  
  <p>Why did the online compiler produce different output, ignoring the <code>\r</code>?</p>