Re:What XOR is and why it's useful
by wat10000 on Tuesday February 18, 2025 @04:30PM
(#43095353)
C does have a logical XOR, it's the `!=` operator. Unlike other logical operators, it requires the arguments to be normalized to a single truth value. It plays nicely with C's convert-to-boolean operator `!!`.
[ Parent
| on HN ]
^ ?
That's bitwise, not logical.
Re:What XOR is and why it's useful
by 8n4vidtmkvmk on Tuesday February 18, 2025 @10:09PM
(#43098128)
That's bitwise xor
Re:What XOR is and why it's useful
by Findecanor on Wednesday February 19, 2025 @02:57AM
(#43099757)
I once failed a a test at a job interview because I hadn't realised that (even after having been programming for twenty years).
No need for the second !: !foo != !bar