title: Is it guaranteed that array elements in C will be stored consecutively, with no padding?
body: <p>In other words: is it guaranteed that if I have an array allocated this way:</p>
  
  <pre><code>void *arr = calloc(nmemb, sizeof(some_type))
  </code></pre>
  
  <p>Then <code>elta</code>, <code>eltb</code>, <code>eltc</code> will all point to the same location in memory, which will be the second element of type <code>some_type</code> of this array?</p>
  
  <pre><code>some_type *elta = &amp;((some_type*)arr)[1];
  some_type *eltb = ((some_type*)arr)+1;
  some_type *eltc = (char*)arr+sizeof(some_type);
  </code></pre>
  
  <p>The reason I’m asking this is because I’m trying to do a “container” in C, and if this doesn’t hold then I’m out of ideas how to return a pointer to any other element than the first one.</p>