If I have the code:
uint64_t a = 0x1111222233334444;
uint32_t b = 0;
b = a;
printf("a is %llx ",a);
printf("b is %x ",b);
and the output is :
a is 1111222233334444 b is 33334444
Questions :
Will the behavior be same on big-endian machine?
If I assign a's value in b or do a typecast will the result be same in big endian?
PRIx64
andPRIx32
, respectively.sizeof(long) == sizeof(int)
isn't true anymore.