Class 12 Computer Science: Stack and Queue Fundamentals

Answer key included

This worksheet assesses your understanding of fundamental concepts related to Data Structures such as Stack and Queue, including their operations and applications.

Class 12CBSEComputer Sciencemedium

Your device's Print screen will open — choose "Save as PDF" to download.

Track practice: print a star chart

Class 12 · Computer Science
Name: ____________
  1. Q1.Which of the following data structures is typically used to implement recursion?
    • A.Queue
    • B.Stack
    • C.Linked List
    • D.Tree
  2. Q2.The principle on which a Stack operates is:
    • A.First In, First Out (FIFO)
    • B.Last In, Last Out (LILO)
    • C.First In, Last Out (FILO)
    • D.Last In, First Out (LIFO)
  3. Q3.Which operation is used to add an element to the rear of a queue?
    • A.Pop
    • B.Push
    • C.Dequeue
    • D.Enqueue
  4. Q4.What happens if you try to pop an element from an empty stack?
    • A.Program terminates
    • B.Stack overflow occurs
    • C.Stack underflow occurs
    • D.An exception is always ignored

Preview — full sheet in the PDF

What's inside this workbook

This Class 12 Computer Science Practice contains 10 questions across 2 printable pages and includes a full answer key at medium difficulty. Aligned to the CBSE and NCERT syllabus.

How this worksheet helps your child

  • Builds confidence in core Computer Science concepts taught in Class 12 through repeated, varied practice.
  • Aligned to CBSE and NCERT — questions mirror the pattern children see in school tests and unit assessments.
  • Comes with an answer key so parents and students can self-check in minutes, without needing a teacher.
  • Pitched at medium level — use it for daily homework, weekend revision or quick exam warm-ups.

About this worksheet

This helpful Class 12 Computer Science worksheet focuses on the fundamental data structures of Stack and Queue. Designed with the CBSE curriculum in mind, it provides essential practice for students to solidify their understanding of how these critical data structures operate. Mastering Stacks and Queues is not just about scoring well in exams; it's about building a strong foundation for advanced programming concepts and problem-solving, which are vital skills in the world of computer science. This practice worksheet is ideal for Class 12 students preparing for their CBSE Computer Science examinations, as it directly addresses core topics often tested. It's also suitable for anyone looking to reinforce their knowledge of data handling in an organized, efficient manner, preparing them for future academic and professional challenges.

What your child will learn

  • Identify the characteristics and differences between a Stack and a Queue.
  • Understand the 'Last In, First Out' (LIFO) principle for Stacks and the 'First In, First Out' (FIFO) principle for Queues.
  • Apply the push and pop operations correctly to manipulate data within a Stack.
  • Demonstrate the enqueue and dequeue operations to manage data within a Queue.
  • Recognise practical applications of Stacks and Queues in computer programming.
  • Solve problems involving the manipulation and representation of Stack and Queue data structures.

Understanding the concept

In Computer Science, a data structure is a way of organizing and storing data in a computer so that it can be accessed and modified efficiently. This worksheet introduces two fundamental data structures: Stacks and Queues. Imagine a stack of plates: you can only add a new plate on top, and you can only take a plate from the top. This is exactly how a Stack works – the last item added is the first one to be removed. This is called the 'Last In, First Out' (LIFO) principle. The operations involved are 'push' (adding an item) and 'pop' (removing an item). Now, think about a queue (or a line) of people waiting for a bus: the first person to join the queue is the first one to board the bus. This illustrates how a Queue works – the first item added is the first one to be removed. This is called the 'First In, First Out' (FIFO) principle. The operations here are 'enqueue' (adding an item) and 'dequeue' (removing an item). Both Stacks and Queues are crucial in various computer applications, from managing function calls in programs to handling print jobs and network packets.

Tips for parents & teachers

  • Encourage your child to draw diagrams of Stacks and Queues while solving problems, showing items being added and removed.
  • Review the definitions of 'push', 'pop', 'enqueue', and 'dequeue' operations to ensure clear understanding before starting.
  • Discuss real-world examples of Stacks (like browser history back button) and Queues (like car wash line) to make concepts relatable.
  • Work through a few examples together, verbally tracing the states of the Stack or Queue after each operation.
  • Focus on understanding the LIFO and FIFO principles thoroughly, as they are the core of these data structures.

Topics covered

stackqueuedata structurescbsecomputer scienceclass 12pushpop

How to use this worksheet at home

Open the print view and use your browser's Print dialog to print on regular A4 paper or save as a PDF. Hand the printed sheet to your child (Class 12) and set a relaxed time limit — 15 to 25 minutes works for most Computer Science worksheets. When they're done, open the "With answer key" view and let them self-mark question by question. Re-print as many times as you need; the file never expires and there's no download limit.

Frequently asked questions

Is this Computer Science worksheet really free?
Yes — every workbook on WorkbookWala is 100% free to download and print. No login, no email, no paywall. We're free for students, parents and teachers.
Is it aligned to the CBSE / NCERT syllabus?
Yes. All Class 12 worksheets are built around the CBSE and NCERT pattern so they map cleanly to what your child is studying in school.
Can I print this worksheet at home?
Yes. Click "Open print view" and use your browser's Print dialog to print on standard A4 paper, or save it as a PDF for later. The layout is designed to fit cleanly without scaling.
Does it include an answer key?
Yes — click "With answer key" to print a version with answers included, so parents and students can self-mark in minutes.

More Computer Science worksheets for Class 12

View all →
Something off with this worksheet? Report an issue
Print / Save as PDF