title: how I could allocate this struct? (C)
body: <p>I have a struct defined this way:</p>
  
  <pre><code>typedef struct _rule {
      char * patr_ent[100]; 
      int num_patr_ent; 
      char * plan_sal[100];
      int num_plan_sal; 
      int ult; 
  } Rule;
  </code></pre>
  
  <p>And a variable consisting of an array of Rules:</p>
  
  <pre><code>Rule list_of_rules[100];
  </code></pre>
  
  <p>What I want to do is just: allocate memory for one "Rule" of list_of_rules -> modify the attributes of this Rule (print scan whatever) -> allocate for the next Rule, etc...</p>
  
  <p>Should I do it this way?</p>
  
  <pre><code>Rule* list_of_rules; /* instead of  Rule list_of_rules[100] */
  </code></pre>
  
  <p>And allocate:</p>
  
  <pre><code>list_of_rules[0] = malloc (sizeof(struct _rule));
  </code></pre>
  
  <p>And then do the operations needed?</p>