Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2004 | Question 90

  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021

Assume that the operators +, -, × are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, x , +, -. The postfix expression corresponding to the infix expression a + b × c – d ^ e ^ f is
(A) abc × + def ^ ^ –
(B) abc × + de ^ f ^ –
(C) ab + c × d – e ^ f ^
(D) – + a × bc ^ ^ def


Answer: (A)

Explanation: ^ is right assosciative.

parul_10

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.

See http://geeksquiz.com/stack-set-2-infix-to-postfix/

This solution is contributed by parul Sharma.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!