GATE | Sudo GATE 2020 Mock I (27 December 2019) | Question 51

In a language in which operations are associated right-to-left instead of left-to-right (i.e., a+b+c = a+(b+c)), the value of the expression

7 - (16/(3+1)*2) - 4 

is ___________ .
(A) 3
(B) -5
(C) 7
(D) 9


Answer: (D)

Explanation: Given expression,

7 - (16/(3+1)*2) - 4 

So, according to given association rule,

= 7 - ((16/((3+1)*2)) - 4) 
= 7 - ((16/(4*2)) - 4) 
= 7 - ((16/8) - 4) 
= 7 - (2 - 4) 
= 7 - (-2) 
= 9 

So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.