Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+20 votes

I just want to make sure I have this correct.

Do logic operator precedence go in the order of !(not), &&(and), ||(or) ?

asked in CSC211_Winter2018 by (8 points)

1 Answer

+11 votes
Best answer

Yes, that is correct. So !true || true && true evaluates this way....!true is false. True && true is true. Finally, false || true is true.

answered by (8 points)
selected by