c - Evaluation of this statement -
i reading c book , don't understand statement asking me evaluate.
here statement, !(1 && !(0 || 1))
i can understand things here... have far, not(1 , not(0 or 1))
so it's not 1 , not 0 or 1
? or not 1 , 0 or 1
? 2 !
cancel each other out double negative? answer true
expected false
.
can explain?
(0 || 1) == 1
!1 == 0
1 && 0 == 0
!0 == 1
known true :)
keep in mind ||
, &&
short circuit operators, in case still have evaluate right side because operators not short circuit
Comments
Post a Comment