davegibelli
Programmer
I am trying to use printf to output an unsigned integer from a array of bytes but I cannot figure out how?
e.g.
char ptr[4]={0x00, 0x00, 0x00, 0xff);
printf("%u",*ptr);
but I cannot get the answer 255
e.g.
char ptr[4]={0x00, 0x00, 0x00, 0xff);
printf("%u",*ptr);
but I cannot get the answer 255