No, printf is a so-called variational function , which means that it can accept any number / type parameters.
The problem (well, one of them) with variational functions in classical C is that the parameters are not safe types, that is, the called function has no idea about the type of parameters.
That is the reason why variables are typed using a format string, first, printf has no idea whether the passed value is a pointer, integer, or some other type, and you need to look at the format string to find out what the format is for displaying the value .
This, unfortunately, also opens up the possibility of errors if the format string is incorrect, for example, saying that the value is a pointer to something, when it really is an integer, the program may crash (or, more specifically, cause undefined behavior) from attempts to access the value of a non-pointer as a pointer.
source share