H
hari
Hi,
#include <stdio.h>
#include<conio.h>
int main()
{
int x= -1;
unsigned int y = x ;
unsigned int j = y;
printf("%x %x",x,y)
return 0;
}
When I execute this,I' m getting the output as 0xfffffff
0xfffffff.My expectation is , y is unsigned int,so on assigning a
signed variable with value -1.It should go to 0.
Please correct me if I' m wrong .
Regards
Hari
#include <stdio.h>
#include<conio.h>
int main()
{
int x= -1;
unsigned int y = x ;
unsigned int j = y;
printf("%x %x",x,y)
return 0;
}
When I execute this,I' m getting the output as 0xfffffff
0xfffffff.My expectation is , y is unsigned int,so on assigning a
signed variable with value -1.It should go to 0.
Please correct me if I' m wrong .
Regards
Hari