DS – mcq on Stacks
The following are the objective questions on the topic related to stacks in data structures using C/C++.
1.What type of data structure does a Stack is?
- Linear
- non-linear
- both A&B
- none
Answer: A
2 .____________ is applied in stacks.
- FIRST-IN-LAST-OUT
- LAST-IN –FIRST-OUT
- both A&B
- None
Answer: B
3. Other names for the insertion and deletion operations in Stacks?
- PUSH – insertion, POP –Deletion.
- PUSH – Deletion, POP – Insertion.
- Both A and B are valid.
- Only A is true.
Answer: A/D
4.In stacks, the possibility to do insertion and deletion is ____
- At one end only
- at both ends
- Both A & B.
- None
Answer: A
5. The representation of stack can be done in ____________.
- One way
- Two ways
- Three
- none
Answer: B
6. Pick from the following which represents an element in a stack.
- SIZE
- ITEM
- TOP
- BOTTOM
Answer: B
7. At which position in the stacks , the operations are being done.
- TOP
- SIZE
- POP
- PUSH
Answer: A
8. It is impossible to do ___ operation on empty stack.
- PUSH
- POP
- STATUS
- None
Answer: B
9. From the following which are static and dynamic representations of stacks?
- Arrays – Static, Linked lists – Dynamic.
- Linked lists – Static, Arrays – Dynamic.
- Queues –Dynamic ,Arrays – Static
- None of the mentioned.
Answer: A
10.Is there possibility to add a node at front of the stacks without PUSH operation.
- YES
- NO
Answer: B
11. Can we delete a node at front of a stack by using POP operation?
- YES
- NO
Answer: A
12. Pick out the odd one which is not related to stacks.
- LIFO list
- FIFO list
- Push down lists.
- Piles
Answer: B
13.To implement Quick sort we use the concept of ____.
- Stack
- Set
- List
- Queue
Answer: A
14.The concept “Pile of Plates” is applicable in which one of the following.
- Stack
- Queue
- Linked list
- Tree
Answer: A
15. From the below listed options, which will you use to convert infix to postfix/prefix operators.
- A. Queue
- Stack
- Linked List
- Tree
Answer: B