title: sorting members of structure array
body: <p>Given a structure array (in C) I am attempting to print out the results in groups of gender and in sub order by numerical order.  For example:</p>
  
  <pre><code>struct employee{
  char gender[13]
  char name[13];
  int id;
  };
  </code></pre>
  
  <p>Say I define the structure array like so:</p>
  
  <pre><code>struct employee info[2]={{"male","Matt",1234},{"female","Jessica",2345},{"male","Josh",1235}};
  </code></pre>
  
  <p>How could I go about printing the results like </p>
  
  <pre><code>1234 Matt
  1235 Josh
  
  
  2345 Jessica
  </code></pre>