a) 1
b) 2
c) 3
d) 4 or more
Answer: c
Explanation: In the entire parenthesis balancing method when the incoming token is a left parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as top most element. 3 elements are there in stack before right parentheses comes. Therefore, maximum number of elements in stack at run time is 3.
Related Posts
What is the result of the given postfix expression? abc*+ where a=1, b=2, c=3.
Which of the following statement is incorrect?
While evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?
Which of the following is not an application of stack?
Which of these operators have the highest order of precedence?
In Postfix expressions, the operators come after the operands.
What is the time complexity of evaluation of postfix expression algorithm?
Join The Discussion