What is the correct order of precedence among the following operators?

a
Logical > Relational > Arithmetic
b
Relational > Logical > Arithmetic
c
Arithmetic > Relational > Logical
d
Logical > Arithmetic > Relational

1 answer

The correct order of precedence among the operators is:

c Arithmetic > Relational > Logical

In most programming languages, arithmetic operators (like +, -, *, /) have the highest precedence, followed by relational operators (like <, >, <=, >=), and finally logical operators (like &&, ||, !).