title: Pointer to 2D arrays in C
body: <p>I know there is several questions about that which gives good (and working) solutions, but none IMHO which says clearly what is the best way to achieve this.
  So, suppose we have some 2D array :</p>
  
  <pre><code>int tab1[100][280];
  </code></pre>
  
  <p>We want to make a pointer that points to this 2D array. 
  To achieve this, we can do :</p>
  
  <pre><code>int (*pointer)[280]; // pointer creation
  pointer = tab1; //assignation
  pointer[5][12] = 517; // use
  int myint = pointer[5][12]; // use
  </code></pre>
  
  <p>or, alternatively : </p>
  
  <pre><code>int (*pointer)[100][280]; // pointer creation
  pointer = &amp;tab1; //assignation
  (*pointer)[5][12] = 517; // use
  int myint = (*pointer)[5][12]; // use 
  </code></pre>
  
  <p>OK, both seems to work well. Now I would like to know :</p>
  
  <ul>
  <li>what is the best way, the 1st or the 2nd ?</li>
  <li>are both equals for the compiler ? (speed, perf...)</li>
  <li>is one of these solutions eating more memory than the other ?</li>
  <li>what is the more frequently used by developers ?</li>
  </ul>