निम्नलिखित अभिव्यक्ति का आउटपुट क्या होगा?
What will be the output of the following expression ?
x = 4
print(x<<2) A
4
B
16
C
6
D
2
Explanation
Sure!
The << operator shifts the bits to the left.
For x = 4 (binary 100), x << 2 shifts the bits two places left, giving 10000, which is 16.
Answer: (B) 16.
Correct Answer: B) 16