title: Different ways to deallocate an array - c++
body: <p>If you have said</p>
  
  <pre><code>int *arr = new int[5];
  </code></pre>
  
  <p>What is the difference between </p>
  
  <pre><code>delete arr;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>delete [] arr;
  </code></pre>
  
  <p>I ask this because I was trying to deallocate memory of a 2d array and</p>
  
  <pre><code>delete [][] arr; 
  </code></pre>
  
  <p>did not seem to work but</p>
  
  <pre><code>delete arr;
  </code></pre>
  
  <p>seemed to work fine</p>
  
  <p>Thank you in advance!</p>