Report Bug

QusWhat will the following code output? print(5 ^ 3) Qusनिम्नलिखित कोड आउटपुट क्या होगा? print(5 ^ 3)


A. 6
B. 1
C. 2
D. Error


Solution
A. 6



Explanation
<p>uses the bitwise XOR (^) operator.</p><p>Convert numbers to binary:</p><p><br></p><p>5 → 0101</p><p><br></p><p>3 → 0011</p><p><br></p><p>Perform XOR operation:</p><p><br></p><p>^ 0011</p><p>= 0110</p><p>-------------</p><p>0110 in decimal = 6</p>
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 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 Best Website and Software Company in Allahabad