Multiple choice technology mainframe

What is the precedence rule (from highest to lowest) applied for a complex condition if parentheses are not used.

  1. Arithmetic, Relational, NOT, AND, OR

  2. Relational, Arithmetic, NOT, AND, OR

  3. Arithmetic, Relational, AND, OR, NOT

  4. Arithmetic, Relational, OR, AND, NOT

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In complex COBOL conditions without parentheses, arithmetic expressions are evaluated first, then relational operations, followed by logical NOT, then AND, and finally OR. This hierarchy ensures mathematical computations happen before comparisons, and negation is applied before conjunction/disjunction. Option C is wrong because NOT must precede AND. Option D incorrectly places OR before AND.