Variable Argument Lists:
signature: int foo(type bar, ...)
The ... indicates variable argument list. At least one type is required to preceed (as its used with stack magic to make this work)
usage:
int foo(const char* format, ...) {
va_list list; // declare the va type
va_start(list, format); // pass in va_list and preceeding type, this initializes things
type a = va_arg(list, type); // grabs the next item casting to desired type
caveats: you have to know how many arguments there will be. It uses stack magic.
#includechar, short, long, long long
int can be short or long
8bits, 16bits, 32bits, 64bits
int is typically 32bits
VLA (Variable Length Array)
As of C99
Array sized at runtime, via variable arguments, allocated on the stack.
int array[x][y];