title: how to pass struct pointer as argument in a variable argument function in C
body: <p>I need to pass a struct pointer in my function which takes variable arguments. What is the correct way to do that. I tried this following code.Just pasting the code snippet, and not the full code.</p>
  
  <pre><code>struct node {
  int label,
  bool visited} vertex;
  
  //My arguments in this function should be variable/unknown at runtime. It should take n number of streuct pointer arguments
  int and_gate(struct vertex * v1, )
  {
    va_list valist;
    va_start(valist, num) //not sure
    int out=0;
  
    for(int i=0;i&lt;num,i++)
      out = va_args(valist, v1);
  }
  
  int main()
  {
     struct vertex a,b,c;
     and_gate(3, &amp;a,&amp;b,&amp;c)
  }
  </code></pre>