Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2016 (Set 1) | Question 55

  • Last Updated : 10 Sep, 2021

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


Operator  Precedence   Associativity     Arity
+           High         Left            Binary
-           Medium       Right           Binary 
*           Low          Left            Binary 

The value of the expression 2 – 5 + 1 – 7 * 3 in this language is __________ ?
 
Note : This question was asked as Numerical Answer Type.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

(A) 1
(B) 2
(C) 3
(D) 9


Answer: (D)

Explanation: = 2 – 5 + 1 – 7 * 3
= 2 – 6 – 7 * 3
= 2 – (-1) * 3
= 3 * 3
= 9

 

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :