title: What does '\0' mean?
body: <p>I can't understand what the '\0' in the two different place mean in the following code:</p>
  
  <pre><code>string x = "hhhdef\n";
  cout &lt;&lt; x &lt;&lt; endl;
  x[3]='\0';
  cout &lt;&lt; x &lt;&lt; endl;
  cout&lt;&lt;"hhh\0defef\n"&lt;&lt;endl;
  </code></pre>
  
  <p>Result:</p>
  
  <blockquote>
    <p>hhhdef</p>
    
    <p>hhhef</p>
    
    <p>hhh</p>
  </blockquote>
  
  <p>Can anyone give me some pointers?</p>