MCQ Answer

<p>What will be the output of the following expression ?</p><pre>x =4<br>print(x&lt;&lt;2)</pre><div><br></div>

What will be the output of the following expression ?

x =4
print(x<<2)



निम्नलिखित कोड का आउटपुट क्या होगा?

x =4
print(x<<2)
Topic : Operators Expressions and Python Statements

A. 4

B. 16

C. 6

D. 2




Correct Answer is :

B. 16



Explanation

binary of 4 is : 100

After sifting 2 bits at left the value is : 10000 which is 16 in decimal so the answer is 16

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz