title: Using pointers with functions and structs
body: <p>Hello i'm selfstudying C and i'm a bit confused about the following code since i don't know if i'm understanding the code properly. I would be very thankful if someone could read my explanation and correct me if i'm wrong. </p>
  
  <p>The code is from a header file. The function of the program should be uninteresting at this point, since my comprehension problem is about the pointers and the values the functions give back. So first of all i'm declaring 3 arrays of char and an integer in my employee struct.</p>
  
  <pre><code>struct employee
  {
      char firstname[11];
      char lastname[11];
      char number[11];
      int salary;
  }
  </code></pre>
  
  <p><br/> 5 functions are declared in the header file. The first function takes 4 values (3 pointers and one int) and gives back a pointer to a struct. The second function gets a pointer to the "struct employee" <strong>and</strong> gives back a pointer <strong>to an element</strong> of the array "char firstname" in the struct employee. The functions 3 and 4 are doing the same for the other  both arrays.<br/> The function 5 gets a pointer to the struct employee but gives back an int <strong>and not</strong> a pointer. So it is just using the declared variable in the struct.</p>
  
  <pre><code>struct employee* createEmployee(char*, char*, char*, int); //1
  char* firstname (struct Employee*);                        //2
  char* lastname (struct Employee*);                         //3
  char* number (struct Employee*);                           //4
  int salary (struct Employee*);                             //5
  </code></pre>