Help bosses the bunch of c + + code Its logic sequence is what kind of The x3=8; Y3=5 & amp; & ! (6/5) | | (x3=0); The output x3=0
CodePudding user response:
The output should be y3=0, and (x3=0) should be (x3==0), first calculate the brackets, for 5 & amp; & 0 | | 0, so the result is 0
CodePudding user response:
5 is true, 6/5 is really So, 5 & amp; & ! (6/5) is false, at that time, the last expression determines the result of y3, hence the x3=0, and because of (x3=0) is false, so y3=0 If there is no exclamation point! Because 5 & amp; & (6/5) had been true, most of the compiler no longer behind to calculate the value of the expression, so the x3=0 don't perform, but still the x3 is equal to 8, y3=1