GATE | GATE-CS-2004 | Question 90
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
Explanation: ^ is right assosciative.
This solution is contributed by parul Sharma.
Quiz of this Question
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.