Q. For the following arithmetic expression:

  

((2+3)*(4/2))+2


Show step-by-step process for matching parentheses using stack data structure.


Answer :-

((2+3)*(4/2))+2
= ( 5 * ( 4/2 ) ) + 2
= ( 5 * 2 ) + 2
= 10 + 2
= 12

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post