+ 3
A statement (a=!5>10)evaluates to zero.How?
Ambiguity in stamentent
3 Answers
+ 26
What language?
+ 4
when we write parenthesis according precendense: a =( (!5) > 10) and variable a will be 0.
in K&R C and old ANSI C we have not boolean type and boolean values represented by integers. zero represent a False value, and any non-zero integer represent a True value.
5 is not zero and a True.
!5 is False and zero.
0 < 10 is a False and zero.
a = 0 assign a to zero and all expression value is zero (or False)
+ 2
c