+1 vote
in Data Structures & Algorithms I by (110k points)
The postfix form of the expression (A+ B)*(C*D- E)*F / G is?

(a) AB+ CD*E – FG /**

(b) AB + CD* E – F **G /

(c) AB + CD* E – *F *G /

(d) AB + CDE * – * F *G /

Enquiry is from Stack Operations in portion Abstract Data Types of Data Structures & Algorithms I

I had been asked this question in an interview.

1 Answer

+1 vote
by (412k points)
selected by
Best answer
Correct choice is (c) AB + CD* E – *F *G /

Best explanation: (((A+ B)*(C*D- E)*F) / G) is converted to postfix expression as

(AB+(*(C*D- E)*F )/ G)

(AB+CD*E-*F) / G

(AB+CD*E-*F * G/). Thus Postfix expression is AB+CD*E-*F*G/

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.