यदि x = 1 है, तो x << 2 का परिणाम क्या होगा?
If x = 1, then what will be the result of x << 2?
A
4
B
2
C
1
D
8
Explanation
<< is the left shift operator in Python.
It shifts the bits of a number to the left by the given number of positions.
🔸 Given:
x = 1
x << 2
Means: Shift bits of 1 to the left by 2 positions
🔍 Binary Calculation:
-
1in binary =0001 -
Shift left by 2:
0001→0100
That is:
1 << 2 = 1 × 2² = 4
Correct Answer: A) 4