First: x= is an assignment operation, not an equality operation.
Second: (3||'x') evaluates to true, since both 3 and the character 'x' evaluate to true, and you're basically taking the logical-or of true or true. This result is represented by 1 when interpreted as an integer in the comparison 1 > 88, which evaluates to false (represented by 0 when stored in x).
So the whole thing x = (3 || 'x') > 88 is equivalent to x = 0.
In while(x = 0), x is assigned the value 0, which is also what it returns as the conditional value for the while loop. So the loop body never executes.
14
u/khedoros Nov 02 '20
Sure. Although there are a couple of patterns in the code that suggest it has some typos/bugs, as posted.