I have come across a problem involving exclamation marks and integers whilst reading a code in my reference book.
Let us say I have declared an integer variable name
In C, !number will evaluate to 1 if number == 0 and to 0 if number != 0. And in C, 1 is true and 0 is false.
Using an explicit comparison like number == 0 have the same effect but you might find it easier to read.