GATE CS 2024, set 1 · Question 33 · Programming and Data Structures · Numerical answer (NAT) · 1 mark · no negative marks

Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.
The value of the expression 3 + 1 + 5 ∗ 2 / 7 + 2 - 4 - 7 - 6 / 2 as per the above rules is ______

OperatorPrecedenceAssociativity
+HighestLeft
-HighRight
∗MediumRight
/LowRight
Answer

Answer 6

Answer from the official GATE CS 2024 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes