NCERT Class 12 Computer Science Computer Science: Chapter 4 — Queue
This chapter introduces the Queue data structure in Computer Science, contrasting it with the Stack from the previous chapter. A Queue operates on the First-In-First-Out (FIFO) principle, also known as First Come First Served (FCFS). It's an ordered linear list where elements are added at one end (REAR/TAIL) and removed from the other (FRONT/HEAD). The chapter provides real-life examples like people in a queue for assembly, customers at a bank counter, and vehicles at a petrol pump. It also details applications such as train ticket waiting lists, customer service call queues, and traffic flow on a single-lane road. Understanding Queues is crucial for students learning data structures and their practical implementations in computer science.
Quick info
| Board | CBSE / NCERT |
|---|---|
| Class | Class 12 |
| Subject | Computer Science |
| Book | Computer Science |
| Chapter | Chapter 4 — Queue |
| Language | English |
| PDF type | NCERT Textbook |
| Session | CBSE 2026 |
| Reading time | 3 minutes |
| Word count | 445 |
Learning outcomes
- Understand the First-In-First-Out (FIFO) principle of a Queue.
- Differentiate between Queue and Stack data structures.
- Identify real-life applications of Queues.
- Learn about the FRONT and REAR ends of a Queue.
- Understand the concept of Deque (Double-Ended Queue).
Vocabulary
| Word | Meaning |
|---|---|
| Queue | A linear data structure that follows FIFO principle. |
| FIFO | First-In-First-Out principle, where the first element added is the first to be removed. |
| LIFO | Last-In-First-Out principle, characteristic of Stacks. |
| FCFS | First Come First Served, an alternative name for FIFO. |
| REAR | The end of the queue where new elements are added (also called TAIL). |
| FRONT | The end of the queue from where elements are removed (also called HEAD). |
| Deque | Double-Ended Queue, a data structure where elements can be added or removed from both ends. |
The complete chapter text is read in the official NCERT PDF viewer below (streamed from ncert.nic.in). This page provides NCERT Help study material — summary, vocabulary, practice questions, and FAQs — not a full reproduction of the textbook.
Read chapter online
This PDF is loaded from the official NCERT website (ncert.nic.in). Use the page buttons below to read — download is disabled on NCERT Help.
Read page by page below. PDF is streamed from the official NCERT website — no download button on this page.
Practice questions
- What is the principle followed by a Queue data structure? Answer: A Queue follows the First-In-First-Out (FIFO) principle.
- What are the two ends of a Queue usually called? Answer: The two ends are usually called FRONT (for removal) and REAR (for addition).
- Give one real-life example of a Queue. Answer: Students standing in a queue for morning assembly, or customers at a bank cash counter.
- What is another name for the REAR end of a Queue? Answer: Another name for the REAR end is TAIL.
Practice MCQs
Q1. Which principle does a Queue data structure follow?
Explanation: Queues are designed to process elements in the order they arrive, adhering to the FIFO principle.
Q2. In a Queue, new elements are added at which end?
Explanation: The REAR end, also known as the TAIL, is where new elements are inserted into a Queue.
Q3. Which end of the Queue is used for removing elements?
Explanation: Elements are removed from the FRONT end of the Queue, also referred to as the HEAD.
Q4. The FCFS approach is synonymous with which data structure principle?
Explanation: FCFS (First Come First Served) is another term used to describe the FIFO (First-In-First-Out) principle of Queues.
Q5. Which of the following is NOT a typical application of a Queue?
Explanation: Undo functionality typically uses a Stack (LIFO) to reverse actions, not a Queue (FIFO).
Frequently asked questions
What is a Queue in Computer Science?
A Queue is a linear data structure that follows the First-In-First-Out (FIFO) principle, meaning the first element added to the queue will be the first one to be removed.
What is the difference between a Queue and a Stack?
A Stack follows the Last-In-First-Out (LIFO) principle, while a Queue follows the First-In-First-Out (FIFO) principle.
What are the two main operations performed on a Queue?
The two main operations are Enqueue (adding an element to the REAR) and Dequeue (removing an element from the FRONT).
Can you give a real-world example of a Queue?
Yes, examples include customers waiting in line at a ticket counter, vehicles at a toll booth, or calls waiting in a customer service center.
What does FIFO stand for?
FIFO stands for First-In-First-Out.
What is the REAR end of a Queue?
The REAR end, also known as the TAIL, is the position in the queue where new elements are added.
What is a Deque?
A Deque (Double-Ended Queue) is a data structure that allows elements to be added or removed from both the front and the rear ends.
Related resources
Important topics
Topics covered
NCERT Class 12 Computer Science — Computer Science — Chapter 4 — Queue. Verified by NCERT Help Editorial Team. Reviewed on 29 Jul 2026. Last updated 10 Aug 2026.