- 1
Why would I ever need the NOT operator?
2 Respuestas
+ 2
it is useful in inversion of result.
0
There are plenty uses of not.
Sometimes it's just used to check it a value is NOT something, i.e. you don't know what it is but you know that it ain't a particular value such as 0
if (x != 0)
A better example is when you needed to reverse the result of a check condition, i.e. if a library function returns 0 if the check condition is true, then you need to use "not" to change the return value i.e 1 for true and 0 for false.