Multiple choice

What is the correct precedence of the following operators? !=, &&, *, >=

  1. &&, *, >=, !=

  2. *, >=, !=, &&

  3. *, !=, &&, >=

  4. >=, !=, &&, *

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

Operator precedence in C from highest to lowest: multiplication (*) has level 3, relational operators (>=) have level 6, equality operators (!=) have level 7, and logical AND (&&) has the lowest at level 11. Higher precedence operators are evaluated first.