title: How to count the elements of an array of struct in C?
body: <p>I need to build a function that gets an array of struct as a parameter. The struct looks like that</p>
  <pre><code>struct Person {
    char gender;
    char eyecolour;
    char haircolour;
    int age;
  
  };
  </code></pre>
  <p>The function should return the age of the oldest person in the array. So, for that, I believe I have to know how many elements are there in the array given as the parameter, then I can figure out the oldest age with a for and an if.</p>