Hello everyone.Im having some problem understanding whats going on here ...

This code

Code:
unsigned char x;
x=-5;
printf("%d",x);
Gives an output of 5 .. no problemo

but

Code:
unsigned int x;
x=-5;
printf("%d",x);
prints out -5 ... why ?

As for my 2nd question,

Code:
long long x = 18232323232322;
printf("%d",x);
The compiler is generating a warning :
[Warning] integer constant is too large for "long" type and printing a value of 187060802.
Im on a 32-bit machine and using Dev C++ 4.9.9.2 , where the long long int is supported and is in the range –9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.

Thank you.