A relatively minor remark to conclude the discussion of the conditional operator is its right-associative behavior:
condition1 ? a : condition2 ? c : d
The preceding means the same as the following:
condition1 ? a : (condition2 ? c : d)
However, nested conditional operators tend to produce unreadable code quickly (partly due to the terse
?: syntax), so I generally recommend avoiding such use.