Priority of logical operators | Sololearn: Learn to code for FREE!


Priority of logical operators

Do those logical operators (like &&, ||, and !) have some priorities over each other? Or do they just follow the left-to-right sequence while the code is read (unless there are parentheses)?

2/16/2017 2:52:36 PM


1 Answer

New Answer


AFAIK, && has higher precedence than ||. ! acts only on its right member, so it has the highest precedence of them 3.