@gilesgoat 2, because any non-zero value is truthy so the right hand side isn't evaluated
@eniko That's quite a weird problem to be solved in C .. if you really want the left-to-right precedence and AVOID the computation of the 'right side' if left is already seen as 'false' .. actually I don't even know if it can be solved because it would be something 'at compile time' ? 🤔
@gilesgoat @eniko
(x = 2) ? x : 5
avoids evaluating 2 twice, but needs a variable declaration