I would like to print the unsigned char in this format: 0xff. How can I do so? Thanks.
0xff
printf("0x%x\n", variable);
Visit printf documentation page for more details