DATA STRUCTURE AND ALGORITHMS Stack MCQ
Data Structure And Algorithms MCQ- Home
- Tutorials
- Data Structure And Algorithms
- Stack
- Multiple Choice Question
(1) Which of the following are important uses of stack?
A) Expression Evaluation
B) Recursion
C) Expression Conversion
D) All
Explanation
Stack can be used for all of these purposes such as expression evaluation, recursion and conversion of prefix to postfix or infix and vice versa.
(2) Which of the following data structure can be used for stack implementation?
A) Array
B) Linked list
C) Constant
D) Both a and b
Explanation
Both array and linked list can be used for stack implementation.
(3) Which of the following pointer is used to track the push and pop operations?
A) DP
B) AP
C) SP
D) PO
Explanation
SP is stack pointer that points the current location for insertion or removal of data items from stack
(4) Which of the following is valid method for stack implementation?
A) Push
B) Pop
C) Display
D) All
Explanation
Display also a method that is sometimes write down while stack implementation for data lookup purpose.
(5) How many ways to insert data onto the stack?
A) 1
B) 2
C) 3
D) 4
Explanation
There is only one method to put data onto the stack which is called push.
(6) Which of the following order stack implement?
A) FIFO
B) FCFS
C) LIFO
D) Random
Explanation
In stack only data items can be retrieved in LIFO (Last in First out) order
(7) The process of storing data from stack is called.
A) Pop
B) Push
C) Insertion
D) Deletion
Explanation
Push operation terminology is used for insertion of data item onto the stack.
(8) The process of retrieving data from stack is called.
A) Pop
B) Push
C) Enqueue
D) Dequeue
Explanation
Pop operation is known as retrieval of last inserted data item from stack.