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

निम्नलिखित छद्मकोड का आउटपुट क्या होगा, जहां ʌ XOR ऑपरेशन का प्रतिनिधित्व करता है?

What will be the output of the following pseudocode, where ʌ represent XOR operation ?

Integer a, b, c
Set b = 4, a = 3
c = a ^ b
Print c
A)
B)
C)
D)

Explanation:

Sure!

  • a = 3 (binary 0011) and b = 4 (binary 0100).
  • XOR (^) gives 1 when bits are different, 0 when the same.

So, 3 ^ 4 = 7 (binary 0111).

Answer: (D) 7.

Latest Updates