The code relies on undefined behavior. You're passing 64-bit values to a printf() expecting 32-bit values. printf() uses a stack hack to get its parameters, so passing something of the wrong size can have unpredictable consequences.
Ok thanks. So how could one protect himself from getting totally gibberish data (e.g. as in my case since the first param. is already too big it wrecks the second one, so how could you protect the code from this kind of undefined behavior.
By being careful or by avoiding techniques prone to generate undefined behavior when garbage is passed as input, as is the case with variadic arguments.
I think in my case this would be the solution: printf("=%llu =%llu\n", 11111111111111111111111111111111111, 11111111111);
At least it leaves the second number alone, which is all I really wanted.
If your compiler checked the printf arguments, you have a chance of catching that sort of error. However, most compilers don't. The only real solution is to use a type-safe alternative like the iostream library.