89.4k views
3 votes
If (quotaAmt > 100 || sales > 100 && productCode == "C")

bonusAmt = 50;

When the above code is executed, which operator is evaluated first?

a.
||

b.
==

c.
=

d.
&&

1 Answer

2 votes

Answer:

==

Step-by-step explanation:

Operator precedence, it tells about the flow of operator execution o which operator execute first and which execute last.

'==' > '&&' > '||' > '='

According to precedence table,

the equal equal operator '==' comes first. so, it execute first and then NOT operator, then OR operator and finally equal operator.

User KennyVB
by
8.4k points