title: Why the difference in size when declaring a string in C++?
body: <p>I should know this, but I don't and I think its probably a major gap in my foundation knowledge so I thought I should ask the experts.</p>
  
  <p>Given:</p>
  
  <pre><code> char s1[] = { 'M', 'y', 'W', 'o', 'r', 'd' };
   char s2[] = "MyWord";
  
  cout &lt;&lt; strlen(s1)&lt;&lt;endl;
  cout &lt;&lt; strlen(s2)&lt;&lt;endl;
  
  cout &lt;&lt; sizeof(s1)&lt;&lt;endl;
  cout &lt;&lt; sizeof(s2)&lt;&lt;endl;
  </code></pre>
  
  <p>Why when declared as <code>s1</code> is the <code>strlen</code> 9 but when declared as <code>s2</code> is is 6? Where does the extra 3 come from, it it the lack of a null terminating character?</p>
  
  <p>And I understand that <code>sizeof(s2)</code> is 1 byte larger than <code>sizeof(s2)</code> because s2 will have the null character automatically added? </p>
  
  <p>Please be gentle, TIA!</p>