#include #include varargs_test(char *fmt, ...) { va_list argp; /* argp is the pointer to the variable args */ va_start(argp, fmt); /* indicats variable args come after fmt */ vprintf(fmt, argp); va_end(argp); /* need to undef varrargs macro */ } main() { varargs_test("%s %s\n", "hello", "world"); }