I have the following structure
struct data { uint64_t addr:50; };
If I want to print the value addr in hexadecimal decimal format, which should I use the format specifier?
addr
You have to do this in two steps: first create a complete variable uint64_t with a copy addr , then print it with "%" PRIx64 .
uint64_t
"%" PRIx64