title: When/Why is '\0' necessary to mark end of an (char) array?
body: <p>So I just read an example of how to create an array of characters which represent a string. </p>
  
  <p>The null-character <code>\0</code> is put at the end of the array to mark the end of the array. Is this necessary? </p>
  
  <p>If I created a char array:</p>
  
  <pre><code>char line[100]; 
  </code></pre>
  
  <p>and put the word:</p>
  
  <pre><code>"hello\n"
  </code></pre>
  
  <p>in it, the chars would be placed at the first six indexes <code>line[0]</code> - <code>line[6]</code>, so the rest of the array would be filled with null characters anyway?</p>
  
  <p>This books says, that it is a convention that, for example the string constant <code>"hello\n"</code> is put in a character array and terminated with <code>\0</code>. </p>
  
  <p>Maybe I don't understand this topic to its full extent and would be glad for enlightenment. </p>