CalTree
asked on
get specific byte from unsigned long long
I have an unsigned long long k (64 bits / 8 bytes).
If we number the bytes in k 0 - 7, with byte 0 being on the rightmost end of k, does anyone know of a way to get a specific byte out? For example, byte 3?
Thanks.
If we number the bytes in k 0 - 7, with byte 0 being on the rightmost end of k, does anyone know of a way to get a specific byte out? For example, byte 3?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ah,
printf("%2x",trans.s[7-0])
printf("%2x",trans.s[7-1])
printf("%2x",trans.s[7-2])
etc...
Exceter