1 void test(const char *format, ...)
4 va_start(argp, format);
9 while (*format != '\0')
18 else if (*format >= '0' && *format <= '9')
22 while (*format >= '0' && *format <= '9')
32 while (*format != ']')
42 int *ints = va_arg(argp, int *);
43 for (int i = 0; i < n; i++)
47 printf("%d", ints[i]);
50 else if (*format == 's')
52 const char **strs = va_arg(argp, const char **);
53 for (int i = 0; i < n; i++)
57 printf("%s", strs[i]);
63 fputs("Not implemented", stdout);
64 char char_to_print = va_arg(argp, int);
65 putchar(char_to_print);
79 int ints[] = {1, 2, 3, 6, 8, 2, 7, 8, 1, 245, 277254, 2642, 71, 717, 7};
80 const char *strs[2] = {"abc", "def"};
81 test("Hallo %15[ ]d %2[, ]s\n", ints, strs);