title: Pointer address in a C multidimensional array
body: <p>I'm messing around with multidimensional arrays and pointers. I've been looking at a program that prints out the contents of, and addresses of, a simple array. Here's my array declaration:</p>
  
  <pre><code>int zippo[4][2] = { {2,4},
              {6,8},
              {1,3},
              {5,7}   };
  </code></pre>
  
  <p>My current understanding is that <code>zippo</code> is a pointer, and it can hold the address of a couple of other pointers. By default, <code>zippo</code> holds the address of pointer <code>zippo[0]</code>, and it can also hold the addresses of pointers <code>zippo[1]</code>, <code>zippo[2]</code>, and <code>zippo[3]</code>.</p>
  
  <p>Now, take the following statement:</p>
  
  <pre><code>printf("zippo[0] = %p\n", zippo[0]);
  printf("  *zippo = %p\n", *zippo);
  printf("   zippo = %p\n", zippo);
  </code></pre>
  
  <p>On my machine, that gives the following output:</p>
  
  <pre><code>zippo[0] = 0x7fff170e2230
    *zippo = 0x7fff170e2230
     zippo = 0x7fff170e2230
  </code></pre>
  
  <p>I perfectly understand why <code>zippo[0]</code> and <code>*zippo</code> have the same value. They're both pointers, and they both store the address (by default) of the integer 2, or <code>zippo[0][0]</code>. But what is up with <code>zippo</code> also sharing the same memory address? Shouldn't <code>zippo</code> be storing the address of the pointer <code>zippo[0]</code>? Whaaaat?</p>