about summary refs log tree commit diff stats
path: root/tests/test15.c
blob: b00c71719c8275f8684e35b8af3cc1adde4ef75a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdarg.h>

int my_func(const char* fmt, va_list a)
{
    return vprintf(fmt, a);
}

int my_func1(const char* fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    int ret = my_func(fmt, args);
    va_end(args);
    return ret;
}

int main(int argc, char **argv)
{
    int ret = my_func1("Hello %s World, pi=%g!\n", "x86_64", 3.14159265);
    return 0;
}