(4 < 8 ) || ( 8 < 0 ) || ( 100 > 45 ) -------- true
.... evaluation stops with the first true
and
the entire expression is true
.
The ||
operator also has left to right associativity.
In other words, it works like you expect.
When an expression has several ||
's look
for a true
starting from the left and going toward the right.
The first true
stops the evaluation and causes the entire
expression to be true
.
If every operand is false
then every operand is evaluated and
the entire
expression is false
.
When there are possible side effects it is important to understand that evaluation goes from left to right, as explained above. If there are no side effects (as in the expression used for the question) it doesn't really matter.