[ create a new paste ] login | about

Link: http://codepad.org/dyeCgOJu    [ raw code | output | fork ]

C, pasted on Jan 14:
#include <stdio.h>
#include <stdarg.h>

void f(const char *str, va_list ap)
{
vprintf(str, ap);
}

void b(int m, ...)
{
va_list ap;
va_start(ap, m);
int k = (int)va_arg(ap,int);
f("boo: ", ap);
va_end(ap);
}

int main()
{
b(2, 3, 4, 5, 6);
return 0;
}


Output:
1
boo: 


Create a new paste based on this one


Comments: