Stack MCQ

11. Process of removing an element from stack is called __________

A. Create
B. Push
C. Evaluation
D. Pod

View Answer


12.Pushing an element into stack already having five elements and stack size of 5 , then stack becomes

A. Overflow
B. Crash
C.Underflow
D. User flow

View Answer


13. Which of the following applications may use a stack?

A. A parentheses balancing program
B. Tracking of local variables at run time
C. Compiler Syntax Analyzer
D. All of the mentioned

View Answer


14.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:

A. 1
B. 2
C. 3
D. 4 or more

View Answer


15.Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).
The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

A. 1
B. 2
C. 3
D. 4 or more

View Answer


16. The data structure required to check whether an expression contains balanced parenthesis is?

A. Stack
B. Queue
C. Array
D. Tree

View Answer


17. 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?

A. 1
B. 2
C. 3
D. 4

View Answer


18. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

A. Linked List
B. Stack
C. Queue
D. Tree

View Answer


19.The process of accessing data stored in a serial access memory is similar to manipulating data on a ________

A. Heap
B. Binary Tree
C. Array
D. Stack

View Answer


20.The postfix form of A*B+C/D is?

A. *AB/CD+
B. AB*CD/+
C. A*BC+/D
D. ABCD+/*

View Answer






Also Check :


Discussion


* You must be logged in to add comment.