title: type va_list representation in memory
body: <p>After reading <a href="https://linux.die.net/man/3/va_start%20%22%22" rel="nofollow noreferrer">this</a> and <a href="https://www.tutorialspoint.com/c_standard_library/c_macro_va_start.htm%20%22%22" rel="nofollow noreferrer">this</a>, I understand that<br></p>
  
  <pre><code>void va_start(va_list ap, last);
  </code></pre>
  
  <p>Saves in <code>va_list pa</code> some information about arguments whose number and types are not known to the called function. Later arguments can be extracted via <code>va_arg()</code>.</p>
  
  <p>Documentation doesn't specify how things are put in <code>va_list pa</code>
  <br>In short: I need to know how its being saved in memory. Its memory representation.</p>
  
  <pre><code>#include&lt;stdarg.h&gt;
  #include&lt;stdio.h&gt;
  
  int sum(int, ...);
  
  int main(void)
  {
     printf("Sum of 10, 20 and 30 = %d\n",  sum(3, 10, 20, 30) );
         return 0;
  }
  
  int sum(int num_args, ...)
  {
     int val = 0;
     va_list ap;
     int i;
  
     va_start(ap, num_args);
     for(i = 0; i &lt; num_args; i++)
     {
        val += va_arg(ap, int);
     }
     va_end(ap);
  
     return val;
  }
  </code></pre>
  
  <p>What information is stored in pa ? how does it look in memory for the above example ?
  And how from the above example it knows the type is <code>int</code> and not something else ?</p>