There is an interview question in C as below.
int main()
{
unsigned int a = 9;
a = ~a;
printf("%d\n", a);
}
I though it was supposed to be 6 but it is -10. ~a is assinged back to an unsigned integer then printed out. It should not be a negative value. Isn't it? Hoe come?