🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Logic: all 10 questions

Quiz: Logic · Question 7 of 10

When is p ⊕ q (XOR) true?

When is p ⊕ q (XOR) true?

  1. A.When both are true
  2. B.When both are false
  3. C.When exactly one of them is true
  4. D.Always
Answer & explanation

Correct answer: When exactly one of them is true

XOR means "one or the other, but not both", like p != q in Python.

Can you get the rest right without peeking?

Take the timed Quiz: Logic quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →