void func_int(int count, int param, ...) {
int *argptr = ¶m;
int i;
for (i = 0; i < count; i++, argptr++) {
}
}
void func_double(int count, double param, ...) {
double *argptr = ¶m;
int i;
for (i = 0; i < count; i++, argptr++) {
}
}
int main() {
func_int(4, 0, 1, 2, 3);
func_double(4, .0, .1, .2, .3);
return 0;
}
dm9pZCBmdW5jX2ludChpbnQgY291bnQsIGludCBwYXJhbSwgLi4uKSB7CiAgIGludCAqYXJncHRyID0gJnBhcmFtOwogICBpbnQgaTsKICAgZm9yIChpID0gMDsgaSA8IGNvdW50OyBpKyssIGFyZ3B0cisrKSB7CiAgICAgICBwcmludGYoIiVkXG4iLCAqYXJncHRyKTsKICAgfQp9Cgp2b2lkIGZ1bmNfZG91YmxlKGludCBjb3VudCwgZG91YmxlIHBhcmFtLCAuLi4pIHsKICAgZG91YmxlICphcmdwdHIgPSAmcGFyYW07CiAgIGludCBpOwogICBmb3IgKGkgPSAwOyBpIDwgY291bnQ7IGkrKywgYXJncHRyKyspIHsKICAgICAgIHByaW50ZigiJWxmXG4iLCAqYXJncHRyKTsKICAgfQp9CgppbnQgbWFpbigpIHsKICAgIGZ1bmNfaW50KDQsIDAsIDEsIDIsIDMpOwogICAgZnVuY19kb3VibGUoNCwgLjAsIC4xLCAuMiwgLjMpOwogICAgCiAgICByZXR1cm4gMDsKfQ==