diff options
| author | 2025-11-16 12:11:18 +0100 | |
|---|---|---|
| committer | 2025-11-16 12:11:18 +0100 | |
| commit | 111e71e1511b2abff9176bd6c714c8da796f770e (patch) | |
| tree | 352b723c9144c844037447bd865a8366378df7a5 /test/varargs.c | |
| parent | b0c0f2d2d885c5901de08ed08dba9fff079bf6e3 (diff) | |
basic automated testing
Diffstat (limited to 'test/varargs.c')
| -rw-r--r-- | test/varargs.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/varargs.c b/test/varargs.c deleted file mode 100644 index 89ab21c..0000000 --- a/test/varargs.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <stdarg.h> -#include <stdio.h> - -int sum(int x, ...) { - va_list ap; - va_start(ap, x); - for (int y; (y = va_arg(ap, int));) { - printf("got %d\n",y); - x += y; - } - va_end(ap); - return x; -} - -int main() { - printf("%d\n", sum(1,2,3,4,5,6,5.5,7,0,0)); -} |