I know that when using %x with printf() we are printing 4 bytes (an int in hexadecimal) from the stack. But I would like to print only
%x
printf()
int
You can use the following solution to print one byte with printf:
printf
unsigned char c = 255; printf("Unsigned char: %hhu\n", c);