title: Non null terminated array of characters in c++
body: <p>Given the following code:</p>
  
  <pre><code>#include&lt;iostream&gt;
  int main(){
    char container[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g'};
    for(char* cptr = container; *cptr != 0; cptr++)
      std::cout &lt;&lt; *cptr &lt;&lt; std::endl;
    return 0;
  }
  </code></pre>
  
  <p>It prints these characters in sequence each time I execute it. I cannot understand why the loop would terminate since I have not explicitly specified any null terminator at the end of the container array. Please help.</p>