title: Passing Struct members in Functions
body: <p>I want to pass struct members in function . I don't mean something like that:</p>
  
  <pre><code>struct smth
  {
    int n;
  };
  
  void funct(struct smth s);
  </code></pre>
  
  <p>I want these structs</p>
  
  <pre><code>struct student {
  char name[50];
  int semester;
  };
  
  struct prof {
  char name[50];
  char course[50];
  };
  
  struct student_or_prof {
    int flag;
    int size;
    int head;
     union {
       struct student student;
       struct prof prof;
     }
  }exp1;
  struct student_or_prof *stack;
  struct student_or_prof exp2;
  </code></pre>
  
  <p>To pass their members in a fucntion with variables not struct variables</p>
  
  <pre><code>int pop(int head,int n)
  {
   if(head==n)
    return 1;
   else head++;
  }
  </code></pre>
  
  <p>Because i don't want to use the function for structs only. Is it possible?</p>
  
  <p><strong>EDIT</strong> I want the numbers also to change , not return , something like pointer.</p>
  
  <p><strong>EDIT_2</strong> Also i know that this pop(exp1.head,n) it works, but i want also the exp1.head to change after the end of the function pop.</p>