(Solved) : Hint C Stack Class Using Stack Datastructure Stl Going Program Represents Expression Diffe Q44164952 . . .
Hint: C++ STACK Class
Using Stack Datastructure not STL
We are going to have a program that represents an expression indifferent formats such infix, prefix and postfix. The inputexpressions can be represented in infix, prefix or postfixexpression. The infix expressions are fully parenthesisedexpression. The expressions contains identifiers as operands. Anidentifier is defined by a letter. Any sequence of spaces isconsidered as separator. Add and subtract operation have lesspriority than multiply, divide and modular.
The following are examples of different expressions:
+, – , * , / or % :operators
Infix expressions: “((A+ B ) * t )”
Prefix expressions: “+ %xd-Yc”
Postfix expressions: “ x d % Y c – +”
QUESTIONS:
A. Function named infix_2_prefix that given an infix expressionreturns the prefix expression of the input.
B. Function named prefix_2_infix that given a prefix expressionreturns the fully parenthesized parenthesised infix expression ofthe input.
C. Function named postfix_2_infix that given a postfixexpression returns the fully parenthesized parenthesised infixexpression of the input.
Expert Answer
Answer to Hint: C++ STACK Class Using Stack Datastructure not STL We are going to have a program that represents an expression in …
OR