0
Whats the precedence of logic operators
as in case of a long expression of addition ,BODMAS RULE IS followed. what if a long expression of logical operations is given for execution , how will it be evaluated ?
3 Respuestas
+ 8
Among the most commonly used logical operators, e.g.
! (NOT)
&& (AND)
|| (OR)
Unless brackets are used, NOT has the highest precedence. AND gets evaluated before OR.
+ 2
++,-- both post increment and decrement
++,--both pre increment and decrement,size of,!,-,+both unary
*,/%
<,<=,>,=>
==,!=
&&
!!
?: conditional expression
=simple assignment
,
order is from highest to lowest from top to bottom
0
Here us a video I made to help.
C++ Increment and Decrement Explained Simply in 6 Minutes
Order of Coding Operations
https://youtu.be/GQQFCFWWnaA