reminds me of a colorful discussion i had with myself a few days ago about logical and vs bitwise and :p
Originally posted by skipper
Shadow's right. Locating a "truth table" should be no problem at all, and should give you the insight needed to answer your question.
A little snippet to get you started:
'while ( x == y || y == z)' will pass the test even if y = 1 and z = 0 provided that x does, in fact, equal y.
The use of the logical-OR (||) dictates that only one comparison evaluate to "true" in order to pass the test. Therefore, as soon as a "true" condition is encountered, the remainder are ignored, i.e. not even evaluated.
You will really want to watch out for the logical-NOT (!) being thrown into the mix. You will have, at least, one conversation with yourself, I'm sure. :p