I am asking this question to understand the working of printf as a function which is accepting variable length arguments.
I am learning the variable number of argument concept from here and what confused me is the datatype passing in va_arg(va_list,datatype). I mean they are mentioning one data type here. What about the case where we need to pass arguments with different datatypes. The same thing is done in printf function.
How exactly printf figures out the different type of argument types. As per my thinking they must be checking every % symbol in the first const char* argument and after that the token checking for particular datatypes.