struct DummyStruct{ unsigned long long std; int type; }; DummyStruct d; d.std = 100; d.type = 10; /// buggy printf, unsigned long long to int conve
The %d argument tells printf to interpret the corresponding argument as an int. Try using %llu for long long. And memorize this reference card.
%d
printf
int
%llu
long long
(So no, it's not a bug)