How to loop through a va_list if the number of arguments is unknown?
You must indicate the number of parameters somehow (if you're writing portable code) when using variable length argument lists. You may be now thinking "But printf doesn't require you to indicate a number of arguments!"
True, however the number can be inferred by first parsing the format strings for % format specifiers.
Use a sentinel value as a terminator, e.g NULL
or -1