After a typo, the following expression (simplified) was compiled and executed:
if((1 == 2) || 0 (-4 > 2)) printf("Hello");
Of course, 0 should not be.
Why does it compile and what does the expression mean?
The original (simplified) should look like this:
if((1 == 2) || (-4 > 2)) printf("Hello");
none of this compiles:
if((1 == 2) || true (-4 > 2)) printf("Hello"); if((1 == 2) || 1 (-4 > 2)) printf("Hello"); if((1 == 2) || null (-4 > 2)) printf("Hello");
c visual-c ++
huebe Jul 25 '13 at 12:48 2013-07-25 12:48
source share