title: Why are strings in C++ usually terminated with '\0'?
body: <p>In many code samples, people usually use <code>'\0'</code> after creating a new char array like this: </p>
  
  <pre><code>string s = "JustAString";
  char* array = new char[s.size() + 1];
  strncpy(array, s.c_str(), s.size());
  array[s.size()] = '\0';
  </code></pre>
  
  <p>Why should we use <code>'\0'</code> here? </p>