What is the difference between signed and unsigned int?
In practice, there are two differences:
cout in C++ or printf in C): unsigned integer bit representation is interpreted as a nonnegative integer by print functions.this code can identify the integer using ordering criterion:
char a = 0;
a--;
if (0 < a)
printf("unsigned");
else
printf("signed");