Question

What is 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 0x0000000
D -1 0000000
Answer & Explanation
Option: [B]

mcq on c programming c basic 03

Your Valuable Comments Please...