Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

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

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
Assam Direct Recruitment Test Series

Computer Science Topics