title: Dynamic Array inside an Dynamic Array
body: <p>I have here some sample code that has what I think is needed to solve my problem.</p>
  
  <p>Basicaly I need to store inside an array that has a variable amount of entries a variable amount of reasons for it. Is this <code>array[5].b[3]</code> not allowed? Is there any alternative for it?</p>
  
  <p>Thanks in advance</p>
  
  <pre><code>typedef struct {
     int a;
     char *reasons;
  }t_a;
  
  f() {
     int space=10,spaceReasons=5;
     t_a *array;
     array=NULL;
  
     array=realloc(array,sizeof(t_a)*space);
     array[5].reasons=realloc(array[5].reasons,sizeof(char)*spaceReasons);
     fgets (array[5].reasons[3]),300, stdin);
     free(array);
  }
  </code></pre>