#How does C treat numeric values as bool?
18 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
only in a logical sense
you can put it in a if statement
but !0 is not 1 in the sense that you can do arithmetic with it
unless C standard says something specifically about this 
crap I completely misunderstood your question
but yeah your thought is correct
@earnest dirge Has your question been resolved? If so, run !solved :)
In C all conditions as you said true if non zero
So in a true false(execute or skip) context ~0 = 1 = 2
Please remember to use !solved if you have your answer
!solved