I had expected each memory address contain 1-byte data. But on below code, I getting 4-byte hex value. Why this happened?
I'm aware of negative int
representation.
char num = -25;
char *ptr = #
printf("%02X", *ptr);
Output : FFFF FFE7
Expected : E7
Edit : Another good answer in here : https://stackoverflow.com/a/8060195/17823490