title: How to add elements in struct in C
body: <p>I have the following code: </p>
  
  <pre><code>struct home {
      int id; 
      int p;  
      int prio; 
      int rasp; 
  };
  
  struct home *P[5];
  
  int new[6][5] =
  {
  
      { 1,  3, 5, 3, 1 }, 
      { 3,  5, 6, 5, 1 },
      { 7,  2, 3, 5, 0 },
      { 12, 1, 5, 3, 0 },
      { 20, 6, 3, 6, 1 },
      { 20, 7, 4, 7, 1 },
  };
  </code></pre>
  
  <hr>
  
  <p>I need to add all elements (without the first element from each row) from the array new to the struct home (in a loop). For example, if we take the first row it looks like this:</p>
  
  <pre><code>id=3
  p=5
  prio=3
  rasp=1
  </code></pre>