निम्नलिखित अभिव्यक्ति का आउटपुट क्या होगा?
What will be the output of the following expression ?
x = 14
print(x>>2) A
14
B
1
C
3
D
2
Explanation
The operation x >> 2 shifts the bits of x (14) two places to the right.
14in binary is1110.- After shifting right by 2, it becomes
0011, which is3in decimal.
So, the output is 3.
Answer: (C) 3
Correct Answer: C) 3