🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

यदि 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:

  • 1 in binary = 0001

  • Shift left by 2: 00010100

That is:

1 << 2 = 1 × 2² = 4

Correct Answer: A) 4

Latest Updates