Computer Science, asked by karnatakamteja1852, 6 months ago

Output of the following program:#include<stdio.h>int main(){ printf("4 >> %d 8 >> %d\n", 4
>>2,8 << 3); return o;}
4 >> 1,8 << 1
04>>16, 8 >> 1
04>>1,8 >> 64
O 4 >> 16,8 << 64​

Answers

Answered by dreamrob
0

Given Program :

#include<stdio.h>

int main()

{

printf("4 >> %d , 8 >> %d\n", 4 >> 2,8 << 3);

return 0;

}

Output :

4 >> 1 , 8 >> 64

Explanation :

4 >> 2

>> : Right Shift

Binary of 4 : 00000100

00000100 >> 2 ⇒ 00000001

Decimal value of 00000001 : 1

8 << 3

<< : Left Shift

Binary of 8 : 00001000

00001000 << 3 ⇒ 01000000

Decimal value of 01000000 : 64

So, the output is 4 >> 1 , 8 >> 64

Similar questions