title: C++: Process 2d array elements in a diagonal fashion
body: <p>Let's say we have a two dimensional arrays, <code>arr[N][N]</code>, where <code>N</code> is a <code>constant integer</code>.
  Assume that every element of <code>arr</code> is initialized.</p>
  
  <p>How do I print the elements of <code>arr</code> antidiagonal-wise using nested for loops?</p>
  
  <p>What I mean is:</p>
  
  <ul>
  <li>After first iteration of the outer-most loop, <code>arr[0][0]</code> will be printed</li>
  <li>After second iteration of the outer-most loop, <code>arr[0][1]</code> and <code>arr[1][0]</code> will be printed</li>
  <li>After third iteration of the outer-most loop, <code>arr[0][2]</code>, <code>arr[1][1]</code>, and <code>arr[2][0]</code> will be printed</li>
  <li>... </li>
  <li>After the last iteration of the outer-most loop, <code>arr[N-1][N-1]</code> will be printed.</li>
  </ul>
  
  <p>Thanks for your time!</p>