?
What is the order of precedence of the logical operators in C?
Answer & Solution
Correct Answer:
Option
D
In C, the order of precedence for logical operators is as follows: OR (||) has the highest precedence, followed by NOT (!), and then AND (&&). This order ensures that expressions are evaluated correctly based on logical conditions.
Option A (AND, OR, NOT) is incorrect because it doesn't follow the correct order of precedence.
Option B (NOT, OR, AND) is also incorrect for the same reason.
Option C (OR, AND, NOT) is incorrect as it doesn't reflect the correct order of precedence for logical operators in C.
Option A (AND, OR, NOT) is incorrect because it doesn't follow the correct order of precedence.
Option B (NOT, OR, AND) is also incorrect for the same reason.
Option C (OR, AND, NOT) is incorrect as it doesn't reflect the correct order of precedence for logical operators in C.
Join the Discussion
Login to post a comment or share your explanation.
Login