Functions With Variable Number Of Arguments In C
by Peter Jay Salzman <p@dirac.org>
Further Reading
- man va_arg
- C Programming FAQ by Steve Summit (Addison Wesley)
- info gcc
Errata
- Default promotions: char, short int to int, float
to double. You can pass 'em; just can't receive 'em.
- Actually, char works on Linux with gcc. Not portable.
- Pre-ANSI header file was <varargs.h>. Incompatible. You don't
need a single known variable here.
- Thank you: Jeff Newmiller and Mark Kim
Prev: printp.c