How can I write a function that accepts a variable number of arguments? Is this possible, how?
int fun(int n_args, ...) { int *p = &n_args; int s = sizeof(int); p += s + s - 1; for(int i = 0; i < n_args; i++) { printf("A1 %d!\n", *p); p += 2; } }
Plain version