Data Structures: Stack and Queues || Multiple Choice Questions || Class 12
1. The process of inserting an element in stack is called:
(a) Create
(b) Push
(c) Evaluation
(d) Pop
2. The process of removing an element from stack is called:
(a) Create
(b) Push
(c) Evaluation
(d) Pop
3. In a stack, if a user tries to remove an element from an empty stack, the situation is called:
(a) Underflow
(b) Empty collection
(c) Overflow
(d) Garbage collection
4. Pushing an element into a stack already having five elements and a stack of size 5, then the stack becomes:
(a) User flow
(b) Crash
(c) Underflow
(d) Overflow
5. Entries in a stack are "ordered". What is the meaning of this statement?
(a) A collection of stacks can be sorted.
(b) Stack entries may be compared with the <' operation.
(c) The entries are stored in a linked list.
(d) There is a Sequential entry that is one by one.
6. 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 above
7. 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: (()(())(()))is:
(a) 1
(b) 2
(c) 3
(d) 4 or more
8. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a:
(a) Queue
(b) Stack
(c) Tree
(d) Linked list
9. A queue is a:
(a) FIFO (First In First Out) list
(b) LIFO (Last In First Out) list
(c) Ordered array
(d) Linear tree
10. If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, in what order will they be removed?
(a) ABCD
(b) DCBA
(c) DCAB
(d) ABDC
11. Data structure stack is also known as _____ list.
(a) First In First Out
(b) First In Last Out
(c) Last In First Out
(d) All of these
12. Data structure Queue is also known as _____ list.
(a) First In First Out
(b) First In Last Out
(c) Last In First Out
(d) All of these
13. In a stack, all insertions take place at _____ end(s).
(a) top
(b) front
(c) rear
(d) any
14. In a Queue, insertions take place at _____ end.
(a) front
(b) top
(c) rear
(d) any
15. In a queue, deletions take place at _____ end.
(a) front
(b) top
(c) rear
(d) any
16. In a stack, deletions take place at _____ end.
(a) front
(b) top
(c) rear
(d) any
17. The terms Push and Pop are related to
(a) Queue
(b) Stack
(c) Both
(d) None
18. Choose correct output for the following sequence of operations (★ signifies top).
push(5), push(8), pop, push(2), push(5), pop, push(1)
(a) 85251
(b) 85521
(c) 2551
(d) 521
19. In which data structure element is inserted at one end called Rear and deleted at other end called Front.
(a) Stack
(b) Queue
(c) Both
(d) Tree
20. Insertion and Deletion operations in Queue are known as _____.
(a) Push and Pop
(b) Enqueue and Dequeue
(c) Insert and Delete
(d) None
21. _____ form of access is used to add and remove nodes from a queue.
(a) LIFO, Last In First Out
(b) FIFO, First In First Out
(c) Both (a) and (b)
(d) None of these
22. _____ form of access is used to add/remove nodes from a stack.
(a) LIFO
(b) FIFO
(c) Both (a) and (b)
(d) None of these
23. Stack follows the strategy of _____.
(a) LIFO
(b) FIFO
(c) LRU
(d) RANDOM
24. Which of the following is an application of stack?
(a) Finding factorial
(b) Reversing of a string
(c) Infix to postfix
(d) All of the above
25 When a stack, implemented as an array/list of fixed size, is full and no new element can be accommodated, it is called an _____.
(a) OVERFLOW
(b) UNDERFLOW
(c) EXTRAFLOW
(d) NOFLOW
26. When a stack is empty and an element's deletion is tried from the stack, it is called _____.
(a) OVERFLOW
(b) UNDERFLOW
(c) EXTRAFLOW
(d) NOFLOW
27. If a user tries to remove an element from empty queue, it is called _____.
(a) Underflow
(b) Empty collection
(c) Overflow
(d) Garbage Collection
28. Pushing an element into stack already having five elements and stack has fixed size of 5, then _____ occurs.
(a) Overflow
(b) Crash
(c) Underflow
(d) User flow
29. What is the term for inserting into a full queue known as?
(a) overflow
(b) underflow
(c) null pointer exception
(d) program won't be compiled
30. A queue in which elements get added in empty area in the front of a queue is called _____.
(a) full queue
(b) circular queue
(c) rounded queue
(d) rotated queu
very good question
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )