Multiple choice technology programming languages

Which of the following has the highest priority? 1. Bitwise XOR 2. Bitwise OR 3. Logical OR 4. Logical AND

  1. Bitwise XOR

  2. Bitwise OR

  3. Logical OR

  4. Logical AND

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

Among the listed operators, Bitwise XOR (^) has the highest precedence. The precedence order is: Bitwise XOR (^) > Bitwise OR (|) > Logical AND (&&) > Logical OR (||). The answer is A because XOR ranks highest. Bitwise operators generally have higher precedence than logical operators, and within bitwise operators, XOR outranks OR. This affects expressions like a ^ b | c - XOR binds tighter.