What will be the output of the following code segment (assuming sizeof(int) returns 4)?

1.1 What will be the output of the following code segment (assuming sizeof(int) returns 4)?
int i = 0x1 << sizeof(int) * 8 – 1;
printf(“\n%x”, i);
i = i >> sizeof(int) * 8 – 1;
printf(“%d”, i);
A) 0x8000000 - 1
B) 80000000 - 1
C) -1 0x80000000
D) -1 80000000


Leave a Reply