back
2 comments
Fortunately modern C compilers are pretty good at warning about such mistakes with printf.
It’s a really neat exercise in understanding the ABI. I like it. If you’ve looked at the ABI for your platform, it’s already something you know, but I didn’t “get it” until I read the answer.

Of course, there’s always the whole “this is undefined behavior; here be dragons” disclaimer along with the fact that a good compiler will warn (or error) on incorrect parameter order.