GATE CS 2016 Set 2 — Question 42

Numerical answer 2 marks Question 42 2016

Question 42

NAT 2 marks · no negative Compiler Design

The attributes of three arithmetic operators in some programming language are given below.

OperatorPrecedenceAssociativityArity
+HighLeftBinary
MediumRightBinary
*LowLeftBinary

The value of the expression 2 − 5 + 1 − 7 * 3 in this language is ______.

Answers and explanations are free — they just need an account.

Where this question comes from

Source: GATE 2016 Computer Science and Information Technology, Set 2, Q42 (question number approximate)