+ 1

How printf() is able to take variable arguments as per users wish? Explain its complete architecture and use of va_start, va_arg

printf() has been described as a variadic function, but I wanna know that as a programmer how can one design a similar kind of function and use of va_end, va_start and va_arg.

10th Jul 2017, 6:06 PM
beingBing
beingBing - avatar
1 ответ
+ 1
That's an interesting question, which I want to hear the answer to too. You can always make functions with an array as the argument (containing as many values as you like) and loop through the array though.
16th Jul 2017, 12:05 AM
James
James - avatar