In C, at least every positive value except for 0 is treated as a boolean true. But what about a negative value? I did some tests and it seems that also negative values are treated as a boolean true. Is this a defined behaviour or implementation specific?

(I came to think about this when I saw in a question, someone promoting declaring "true" and "false" in an enum as 1 and 0.)

c
Edit
Report