Computer Science, asked by nomeshk4, 1 year ago

Evaluate the following postfix expression: 6 2 3 + - 3 8 2 / + * 2 | 3 +

Answers

Answered by siddhartharao77
7
Following is the result of postfix expression : 



Hope this helps!
Attachments:
Answered by ashutoshmishra3065
2

Answer:

Explanation:

Step 1:

A programme is a piece of computer software that can be executed.

arrow forward

Step 2

CODE-

#include

using the std namespace;

/ Function to solve valid postfix expressions. int eval (string s)

{

stack initialization; / stack result

stack s print; / at each step, stack to print

for(int i=0; I enters stack after integer conversion

result.push(s[i]-'0');

}

result; / copy stack state for printing

"STATE OF THE STACK IS: ";

while(s print.empty()!=1)

{

cout<

The resultant output is  52.

#SPJ3

Similar questions