title: Difference between '0', 0 and '\0' in a C string
body: <p>I got this piece of code in C but I do not understand why the output is :</p>
  
  <p><strong>OUTPUT:</strong> "Hell"</p>
  
  <p>I would expect it to be "Hell00000000" rather then "Hell".
  Could enyone please explain why there is only "Hell" ?</p>
  
  <pre><code>char str[666];
  char * x = str + 4;
  strcpy ( str, "Hello world!" );
  
  while ( *x )
   {
     *x ++ = 0;
   }
  printf ( "%s", str );
  </code></pre>