I
iceBlue
Hello
I have this small doubt on unsigned data.
In the following code snippet:
unsigned int a=-16;
int b=-15;
if(b>a) printf("b>a");
else printf("a>b");
Iam getting b>a as the answer.Why?
With unsigned data,what i thought was that,they dont have to reserve the
first bit for sign.Then how come the value of a is -16 even when its
unsigned?
Thanks in adavance..
-iceBlue-
I have this small doubt on unsigned data.
In the following code snippet:
unsigned int a=-16;
int b=-15;
if(b>a) printf("b>a");
else printf("a>b");
Iam getting b>a as the answer.Why?
With unsigned data,what i thought was that,they dont have to reserve the
first bit for sign.Then how come the value of a is -16 even when its
unsigned?
Thanks in adavance..
-iceBlue-