Quote:
|
Originally Posted by kc8nod
Is that really the code you are using? Because I wouldn't think that what you have shown above would even compile.
|
Actually, it will. The compiler only knows that printf() takes a string as the first argument, and then zero or more arguments of any type. It does not type-check these arguments and the argument list is parsed at runtime. The way it was originally written, after the format string is another string, but the printf() function would try to interpret this as an integer (because of the %d in the format string).