Question 2241 – IPv4-an-Fragmentation
April 17, 2024Question 8575 – Data-Structures
April 17, 2024Question 8409 – Data-Structures
The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is
Correct Answer: C
Question 39 Explanation:
→ ’10’ is pushed in the stack
→ ‘5’ is pushed in the stack
→ ‘+’ comes so addition will be done by popping the top two elements in the stackand the result is pushed back into the stack, i.e., 10+5 = 15
→ 60 pushed in the stack
→ 6 pushed in the stack
→ ‘/’ comes. So, 60/6 = 10
→ ‘*’ comes. So, 15 * 10 = 150
→ ‘8’ comes, push in the stack
→ ‘-‘ comes. So, 150-8 = 142
So the final result is 142.
→ ‘5’ is pushed in the stack
→ ‘+’ comes so addition will be done by popping the top two elements in the stackand the result is pushed back into the stack, i.e., 10+5 = 15
→ 60 pushed in the stack
→ 6 pushed in the stack
→ ‘/’ comes. So, 60/6 = 10
→ ‘*’ comes. So, 15 * 10 = 150
→ ‘8’ comes, push in the stack
→ ‘-‘ comes. So, 150-8 = 142
So the final result is 142.
284
213
142
71
Subscribe
Login
0 Comments