title: Indexing multidimensional arrays in C
body: <p>I'm familiar with multidimensional arrays being accessed as such:  <strong>arr[rows][cols]</strong>  which makes sense to me when I imagine it as a grid or coordinate system and locating points. But I'm confused about the line below. I understand it is picking up a pointer to some <strong>struct</strong> located in the array of structures I just have a hard time imagining which location this could represent in terms of the coordinate system I'm used to...its a bitmap by the way and SOMETHING is a pixel.</p>
  
  <pre><code>//what does this line mean   SOMETHING *o = original + row*cols + col;
  
  
  
  for (row=0; row &lt; rows; row++)
   for (col=0; col &lt; cols; col++) {
    SOMETHING* o = original + row*cols + col;
    SOMETHING* n = (*new) + row*cols + (cols-1-col);
    *n = *o;
  }
  </code></pre>