[It seems odd this doesn\'t exist, so apologies in advance if it\'s a duplicate]
I want to test for logical equality in C. In other words, I want to know whether tw
You typically see this:
if ((a == 0) == (b == 0))
Or
if (!!a == !!b)
Since !!a evaluates to 1 if a is nonzero and 0 otherwise.
!!a
Hope this helps!