This set of MCQ questions on stack and queue in data structure includes objective questions on overview of stack and its implementation. It also includes MCQ questions about algorithms for push and pop, various stack implementation arrays on stack and queue in data structure.
1) ……… 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
2) In liked representation of stack ……. holds the elements of the stack.
A. INFO fields
B. TOP fields
C. LINK fields
D. NULL fields
3) …….. form of access is used to add remove nodes from a stack.
C. Both A and B
D. None of these
4) In the linked representation of the stack ……… behaves as the top pointer variable of stack.
A. Stop pointer
B. Begin pointer
C. Start pointer
D. Avail pointer
5) New nodes are added to the ……… of the queue.
D. Both A and B
6) In linked representation of stack the null pointer of the last node in the list signals ……….
A. Beginning of the stack
B. Bottom of the stack
C. Middle of the stack
D. In between some value
7) What happens when you push a new node onto a stack?
A. The new node is placed at the front of the linked list
B. The new node is placed at the back of the linked list
C. The new node is placed at the middle of the linked list
D. No Changes happens
8) A queue is a ………
9) Which of the following name does not relate to stacks?
A. FIFO lists
B. LIFO lists
D. Push down lists
10) The retrieval of items in a stack is ……….. operation.
11) The term push and pop is related to
12) Which is the pointer associated with the stack?
13) The elements are removal from a stack in ………. order.
14) The insertion operation in the stack is called ………
15) …… is the term used to insert an element into stack.
16) Stack follows the strategy of ……..
17) ………. is the term used to delete an element from the stack.
18) Deletion operation is done using ……… in a queue.
19) A pointer variable which contains the location at the top element of the stack is called …..
20) Which of the following is an application of stack?
A. finding factorial
B. tower of Hanoi
C. infix to postfix
D. all of the above
1) B. FIFO, First In First Out
2) A. INFO fields
3) A. LIFO
4) C. Start pointer
5) B. Back
6) B. Bottom of the stack
7) A. The new node is placed at the front of the linked list
8) A. FIFO
9) A. FIFO lists
10) B. pop
11) C. Stacks
12) C. TOP
13) A. Reverse
14) B. push
15) A. Push
16) A. LIFO
17) C. Pop
18) A. front
19) A. Top
20) D. all of the above