Basic problems of Printf output 16
If you use unsigned char, you don't need to use %hx. None of them are negative numbers, and they can be short or not. # include & ltstdio.h & gtmain(){ int I = 250; char c; c = I; Printf("%c\n%x\n ",c, (unsigned character) c); }