1.
In a stack, if a user tries to remove an element from empty stack it is called ______
Answer: Option 'B'
Underflow
2.
The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?
Answer: Option 'A'
350
3.
The postfix form of A*B+C/D is?
Answer: Option 'B'
AB*CD/+
4.
Assume that the operators +,-, X are left associative and ^ is right associative.
The order of precedence (from highest to lowest) is ^, X, +, -. The postfix expression for the infix expression a + b X c – d ^ e ^ f is
Answer: Option 'A'
abc X+ def ^^ –
5.
Convert the following Infix expression to Postfix form using a stack
x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal.
Answer: Option 'A'
xyz*+pq*r+s*+
6.
If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is the order of removal?
Answer: Option 'C'
DCBA
7.
If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is the order of removal?
Answer: Option 'B'
DCBA
8.
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the number of elements present in stack are
Answer: Option 'A'
1
9.
The type of expression in which operator succeeds its operands is?
Answer: Option 'C'
Postfix Expression
10.
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(())) are:
Answer: Option 'C'
Applying the postfix expression evaluation.
11.
Which of the following is not an inherent application of stack?
Answer: Option 'A'
Reversing a string
12.
Process of inserting an element in stack is called ___________
Answer: Option 'B'
Push
Self Explanatory.
13.
Pushing an element into stack already having five elements and stack size of 5 , then stack becomes
Answer: Option 'B'
Overflow
14.
Entries in a stack are “ordered”. What is the meaning of this statement?
Answer: Option 'D'
There is a Sequential entry that is one by one.
15.
Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation.
The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?
Answer: Option 'D'
4