In C, under the stdarg.h
library, variable arguments can be accepted by a function or procedure and usually the argument list is preceded by a count of the number of arguments to follow. Is it possible to validate the user's count of the arguments?
I suspect that it must be possible, because printf() is a varargs function and if the programmer has a mismatch between the number of tags in the format string, and the number of arguments supplied, then a runtime error occurs. So, it seems that printf has some way of detecting the number of arguments supplied.