Skip to main content
2 of 2
added 89 characters in body
Anders R. Bystrup
  • 16.1k
  • 11
  • 65
  • 59

The ^ operator is exclusive or. The truth table for this is

 XOR | false true ------------------- false | false true true | true false 

That's why you get "1" - your if statement evaluates to true.

Cheers,

Anders R. Bystrup
  • 16.1k
  • 11
  • 65
  • 59