I was trying to work on something and I basically have two questions. When creating a signed char, how do you a) what is the convention of initialization and print statement used to print it in hexadecimal and b) if I have a value of -32 assigned to my char, how do I print the hex without the 'ffffff' before the 'e0' and only print the 'e0'(without removing the - if it's possible)
I have tried all the regular syntax that is given, just wondering if it's something obvious that I am missing.
#include <stdio.h>
int main(void) {
signed char tempC = -32;
printf("%x\n", tempC);
return 0;
}
Expected result: e0
Actual result: ffffffe0