The following code
#include<stdio.h>
#include <stdarg.h>
void func1( int a, int b, int c,... )
{
int n, k;
va_list ap;
va_start( ap, b );
printf(" a=%d, b=%d, c=%d, other:\n", a,b,c);
for (n=0; n<c; n++)
{
k = va_arg(ap, int);
printf("%d\n", k);
}
va_end(ap);
}
int main()
{
int a=5;
func1(a,5,3,2,3,4);
}
produces the expected output on my
Visual C++ 2010 Express Edition
.