Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+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 (1 point)

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 (1 point)
selected by
...