title: Array of structures or structure of array in C
body: <p>Which one is the fastest/least memory consuming option of these two:</p>
  
  <pre><code>struct {
  int index;
  char string[10];
  } a[10];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>struct {
  int index[10];
  char string[10][10];
  } a;
  </code></pre>
  
  <p>The first one is clearly easier to use and implement. I also have to mention I will dynamically allocate them. But which one will run faster or be least time consuming?</p>
  
  <p>Thank you!</p>