I'm having following structure
struct data {
uint64_t addr:50;
};
If i want to print the value of addr
in hexa decimal format which format specifier should i use ?
I'm having following structure
struct data {
uint64_t addr:50;
};
If i want to print the value of addr
in hexa decimal format which format specifier should i use ?
You should do it in two steps: first, create a full uint64_t
variable with a copy of addr
, then print it using "%" PRIx64
.