title: How to rotate 2D array of characters
body: <p>I'm trying to rotate this clockwise 90 degrees, but it works not as expected. Must be something to do with pointers which I'm not that familiar.</p>
  <p>OUTPUT Before Rotation:</p>
  <pre><code>hiivp
  nxhxd
  tszeg
  xdlqo
  kwpae
  
  void rotate_right(char **m, int n) {
  char **temp = m;
  for (int i = 0; i &lt; n; i++) {
      for (int j = 0; j &lt; n; j++) {
          m[i][j] = temp[n-1-j][i];
      }
  }
  </code></pre>
  <p>}</p>
  <p>OUTPUT After Rotation:</p>
  <pre><code>kxtnk
  wdsdx
  plzst
  aqsdn
  entxk
  </code></pre>