At the level of the C language, there's no explanation. It's the responsibility of each C implementation to ensure that the semantics of the
!
operator are correct. C programmers can rely on it just working. If you're looking for a lower-level explanation, then you should focus your question better on that, and apply a more appropriate tag. —
John Bollinger 23 secs ago