Report Bug

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

Qus<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">x =4<br>print(x&lt;&lt;2)</pre>


A. 4
B. 16
C. 6
D. 2


Solution
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

Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad