title: Dynamic character array not giving correct string length?
body: <p>I would like to have a dynamic character array who's length equals the loop iteration.</p>
  
  <pre><code>char* output;
  for (short i=0; i&lt;2; i++){
      output = new char[i+1];
      printf("string length: %d\n",strlen(output));
      delete[] output;
  }
  </code></pre>
  
  <p>But <code>strlen</code> is returning 16, where I would expect it to be 1 and 2.</p>