title: How to implement retrieve and update in a C struct
body: <p>Suppose we have the following struct in C:</p>
  
  <pre><code>struct student {
      int AM;
      char name[50];
      char surname[50];
      char course[50];
  };
  </code></pre>
  
  <p>How can someone implement <code>retrieve(R, c, s)</code> and <code>update(R, c, s)</code>.</p>
  
  <ul>
  <li>In <code>retrieve()</code> <code>R</code> is a pointer to a <code>struct student</code>, <code>s</code> is a field of the <code>struct</code> and <code>c</code> will have the value of this field.</li>
  <li>In <code>update()</code> <code>R</code> is again a pointer to a <code>struct student</code>, <code>s</code> is a field of the <code>struct</code> and in the end the field of the <code>struct</code> will have the value of <code>c</code>.</li>
  </ul>