NCERT Class 12 Computer Science Computer Science: Chapter 3 — Stack

NCERT CBSE Class 12 Computer Science Computer Science Chapter 3 English PDF

This chapter introduces the concept of data structures, explaining how they organize and store data for efficient access and processing. It highlights Python's built-in data types like String and List as examples of sequence data structures. The chapter then focuses on the Stack, a linear data structure that follows the Last-In-First-Out (LIFO) principle. Analogies like piles of books or plates are used to illustrate how elements are added and removed exclusively from the top. The importance of learning stacks and queues, despite not being directly available in Python, is emphasized due to their widespread use in programming. This foundational knowledge is crucial for students' understanding of computer science principles and CBSE curriculum.

Quick info

BoardCBSE / NCERT
ClassClass 12
SubjectComputer Science
BookComputer Science
ChapterChapter 3 — Stack
LanguageEnglish
PDF typeNCERT Textbook
SessionCBSE 2026
Reading time3 minutes
Word count523

Learning outcomes

Vocabulary

WordMeaning
Data structureA mechanism to store, organise, and access data along with operations.
Linear data structureA data structure in which elements are organised in a sequence.
StackA data structure following the Last-In-First-Out (LIFO) principle.
LIFOLast-In-First-Out; the most recently added element is the first to be removed.
Top of the stackThe end from which elements are added or removed in a stack.

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.

Loading document …
Page of
Loading page …

Practice questions

  1. What is a data structure? Answer: A data structure defines a mechanism to store, organise, and access data along with operations that can be efficiently performed on the data.
  2. What principle does a stack follow? Answer: A stack follows the Last-In-First-Out (LIFO) principle.
  3. Give an example of a real-world stack. Answer: A pile of books in a library or a stack of plates at home.
  4. Where are elements added or removed from in a stack? Answer: Elements are added or removed from the top of the stack.

Practice MCQs

Q1. Which of the following is NOT a sequence data type mentioned in the chapter?

Q2. The principle followed by a stack is:

Q3. In a stack, elements are added and removed from:

Q4. Which of these is an example of a stack?

Q5. A data structure that organizes multiple elements for efficient operations is called a:

Frequently asked questions

What is a data structure?

A data structure is a way of organizing and storing data in a computer so that it can be accessed and modified efficiently.

What does LIFO stand for in the context of stacks?

LIFO stands for Last-In-First-Out, meaning the last element added to the stack is the first one to be removed.

Can stacks be directly used in Python?

While Python does not have a built-in stack data type, the concept is important and can be implemented using lists or other structures.

What are some real-world examples of stacks?

Real-world examples include a pile of books, a stack of plates, or the undo function in software.

Why is it important to learn about stacks?

Stacks are fundamental data structures used extensively in various programming applications and algorithms.

Related resources

Important topics

Stack LIFO Principle Operations on Stack Implementation of Stack in Python Conversion From Infix To Postfix Notation Evaluation of Postfix Expression

Topics covered

Introduction to Data Types Data Structures Stack LIFO Principle Operations on Stack Implementation of Stack in Python Notations for Arithmetic Expressions Conversion From Infix To Postfix Notation Evaluation of Postfix Expression

NCERT Class 12 Computer Science — Computer Science — Chapter 3 — Stack. Verified by NCERT Help Editorial Team. Reviewed on 29 Jul 2026. Last updated 10 Aug 2026.