Understanding stacks and queues is very important for anyone learning data structures, as they form the backbone of many programming concepts. If you’re preparing for exams or coding interviews, practicing Stack and Queue data structure mcqs can help reinforce your knowledge. Stacks follow the Last In, First Out (LIFO) principle, while queues work on First In, First Out (FIFO), making them useful in different scenarios. These mcqs will test your understanding of push and pop operations in stacks, enqueue and dequeue operations in queues, and their real-world applications. By going through these questions, you’ll gain confidence in handling these fundamental data structures.
Stack and Queue Data Structure MCQs
- 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) Queue
(b) Stack
(c) Tree
(d) Linked list
(a) Queue
- A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
(a) Rear = MAX_SIZE – 1
(b) Front = (rear +1)mod MAX_SIZE
(c) Front = rear+ 1
(d) Rear= front
(a) Rear = MAX_SIZE – 1
- In a stack,if a user tries to remove an element from an empty stack it is called _____.
(a) Underflow
(b) Empty collection
(c) Overflow
(d) Garbage Collection
(a) Underflow
- Entries in a stack are “ordered”. What is the meaning of this statement?
(a) A collection of stacks is sortable
(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
(d) There is a Sequential entry that is one by one
- Which of the following is not the application of stack?
(a) A parentheses balancing program
(b) Tracking of local variables at run time
(c) Compiler Syntax Analyzer
(d) Data Transfer between two asynchronous process
(d) Data Transfer between two asynchronous process
- What is the value of the postfix expression 6 3 2 4 +-*”
(a) 1
(b) 40
(c) 74
(d) -18
(d)-18
- 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
(d) all of the above
- What is the postfix expression for the corresponding infix expression?a+b*c+ (d*e)
(a) abc*+de*+
(b) a+bc+*de*+
(c) a+bc*de*
(d) abc*+(de)*+
(a) abc*+de*+
- It is easier for a computer to process a postfix expression than an infix expression.
(a) True
(b) False
(a) True
- In infix to postfix conversion algorithm, the operators are associated from?
(a) right to left
(b) left to right
(c)centre to left
(d) centre to right
(b) left to right
- Let the following circular queue can accommodate maximum six elements with the following data.What will happen after ADD O operation takes place?
front = 2 rear = 4 queue :__________ L, M, N,___,_____.
(a) front = 2 rear = 5 queue = _______; L, M, N, O,_____
(b) front = 3 rear = 5 queue = L, M, N, O,_____
(c) front = 3 rear = 4 queue = _______; L, M, N, O,_____
(d) front = 2 rear = 4 queue = L, M, N, O,_____
(a) front = 2 rear = 5 queue = _______; L, M, N, O,_____
- How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.
(a) 1
(b) 2
(c) 3
(d) 4
(b) 2
- In linked list implementation of a queue, where does a new element be inserted?
(a) At the head of link list
(b) At the tail of the link list
(c) At the centre position in the link list
(d) None
(b) At the tail of the link list
- A circular queue is implemented using an array of size 10. The array index start with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index.*
(a) 0
(b) 7
(c) 9
(d) 10
(d) 10
- A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?
(a) Queue
(b) Circular queue
(c) Dequeue
(d) Priority queue
(c) Dequeue
- A normal queue, if implemented using an array of size MAX_SIZE, gets full when
(a) Rear= MAX_SIZE-1
(b) Front= (rear+1)mod MAX_SIZE
(c) Front= rear+1
(d) Rear= front
(a) Rear= MAX_SIZE-1
- What is the worst case time complexity of a sequence of n queue operations on an initially empty queue?
(a) 0 (n)
(b) 0 (n + k)
(c) 0 (nk)
(d) 0 (n2)
(a) 0 (n)
- a normal queue, if implemented using an array of size max_size, gets full when
(a) Rear = MAX_SIZE – 1
(b) Front = (rear + 1)mod MAX_SIZE
(c) Front = rear + 1
(d) Rear = front
(a) Rear = MAX_SIZE – 1
- which of the following is not the type of queue?
(a) Ordinary Queue
(b) Single Ended Queue
(c) Circular Queue
(d) Priority Queue
(b) Single Ended Queu
- which of the following is not the correct statement for a stack data structure?
(a) Stack data structure can be implemented using linked list
(b) New node can only be added at the top of the stack
(c) Stack is the FIFO data structure
(d) The last node at the bottom of the stack has a NULL link
(c) Stack is the FIFO data structure
- which of the following is not the application of stack?
(a) A parentheses balancing program
(b) Tracking of local variables at run time
(c) Compiler Syntax Analyzer
(d) Data Transfer between two asynchronous process
(d) Data Transfer between two asynchronous process
- Process of inserting an element in stack is called __________.
(a) Create
(b) Push
(c) Evaluation
(d) Pop
(b) Push
- 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
(a) Overflow
- Entries in a stack are “ordered”. What is the meaning of this statement?
(a) A collection of stacks is sortable
(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
(d) There is a Sequential entry that is one by one
- In a stack if user tries to remove element from the empty stack then it is called as__________.
(a) Underflow
(b) Empty Collection
(c) Overflow
(d) Garbage Collection
(a) Underflow
- which one of the following is an application of stack data structure?
(a) Managing Function Calls
(b) The Stock span Problem
(c) Arithmetic Expression Evaluation
(d) All of the above
(d) All of the above
- circular queue is also known as ______.
(a) Ring Buffer
(b) Square Buffer
(c) Rectangle Buffer
(d) Curve Buffer
(a) Ring Buffer
- insertion and deletion operation in queue is known as
(a) enqueue operation
(b) pup and push
(c) insert and Delete
(d) Add and Remove
(a) enqueue operation
- The complexity of inserting an item into an unsorted list is?
(a) 0(1)
(b) 0(n)
(c) 0(logn)
(d) 0(n2)
(a) Overflow
- In which data structure element is inserted at one end called Rear and deleted at other end called Front?
(a) Stack
(b) Queue
(c) List
(d) Stack and Queue
b) Queue
- Generally Stack can be implemented using ______ and _________.
(a) Array and Binary Tree
(b) Linked List and Graph
(c) Array and Linked List
(d) Array and Queue
(c) Array and Linked List
- when function calls another function then the details of previous function are stored in stack ?
(a) True
(b) False
Conclusion
Practicing Stack and Queue data structure mcqs is a great way to solidify your grasp of these essential concepts. Stacks are widely used in function calls, undo operations, and expression evaluation, while queues play a key role in scheduling and buffering processes. Understanding their implementation and behavior in different situations will help you write more efficient code. Whether you’re a student, developer, or interview candidate, working through these MCQs will sharpen your problem-solving skills and make you more comfortable with data structures. Keep practicing, and you’ll master stacks and queues in no time!