Hello,
I would like to display a hex number and compare with another hex number.
I get a hex number from the server. And I want to display this and compare with another hex number.
However, I know you have to use the format specifier x or X. And I guess as I am using a 32 bit cpu. I have been doing this.
Code:
printf("%.32x", hexNumber);
The number I am looking for is this. However there could be other ones. But I just want to compare with this. 00000000000000000000000000000401
However, shouldn't there be an 'x' displayed like this. 0x00000000000000000000000000000401
Just one more question how can I compare hex numbers?
Code:
if(hexNumber == 0x0000000000000401)
{
/* numbers are the same do something */
}
Many thanks for suggestions,