Knowee
Questions
Features
Study Tools

he result evaluating the postfix expression 10 5 + 60 6/ * 8 – is [GATE CSE 2015]Question 3Answera.284b.71c.213d.142

Question

The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is

[GATE CSE 2015]
Question 3
Answer

  • a. 284
  • b. 71
  • c. 213
  • d. 142
🧐 Not the exact question you are looking for?Go ask a question

Solution

The postfix expression is evaluated from left to right using a stack.

  1. Push 10 onto the stack.
  2. Push 5 onto the stack.
  3. "+" pops 10 and 5 from the stack, adds them, and pushes the result (15) onto the stack.
  4. Push 60 onto the stack.
  5. Push 6 onto the stack.
  6. "/" pops 60 and 6 from the stack, divides 60 by 6, and pushes the result (10) onto the stack.
  7. "*" pops 15 and 10 from the stack, multiplies them, and pushes the result (150) onto the stack.
  8. Push 8 onto the stack.
  9. "–" pops 150 and 8 from the stack, subtracts 8 from 150, and pushes the result (142) onto the stack.

So, the result of evaluating the postfix expression 10 5 + 60 6/ * 8 – is 142. Therefore, the correct answer is (d) 142.

This problem has been solved

Similar Questions

57.  What is the value of the postfix expression 6 3 2 4 + – *?(a) 1(b) 40(c) 74(d) -18

Which of the following is not a valid postfix expression? A. 5 4 + B. 6 5 4 + - C. 4 + 5 D. 8 2 + 2 / E. all of the above are valid postfix expressions

What is the value of the postfix expression of 1 3 8 6 7 + * - + ?Options-110-101-100100

The result for the Postfix Expression ab+cd/- where a=5, b=4, c=9, d=3 isOptions2312645

Write the postfix expression for the following expression(A+B)*C-D*E/F (Don't leave space between the characters)

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.