C++ Logical Operator precedence | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

C++ Logical Operator precedence

Is there a logical operator precedence like there is an arithmetic operator precedence? Meaning, will x || y && z be evaluated the same way as y && z || x? I understand you wouldn't typically use logical operators to compare variables, but it still illustrates my question.

27th Sep 2016, 12:54 PM
Chris G
Chris G - avatar
1 Answer
+ 4
Not there is not a logical operator precedence. The program will read from begging to the end.
15th Oct 2016, 9:46 AM
Lara - avatar