1.

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 II had been asked this question in an interview.

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/



Discussion

No Comment Found

Related InterviewSolutions