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

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

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

Integer a, b, c
Set b = 5, a = 1
c = a ^ b
Print c
A)
B)
C)
D)

Explanation:

Sure! Here's a simple breakdown:

  • a = 1 and b = 5.
  • In binary:
    • a = 10001
    • b = 50101
  • XOR operation (^):
    • Compare bits: 0001 ^ 0101
    • Result: 0100 (binary)
    • 0100 in decimal = 4

Answer:

(A) 4

Latest Updates