Empowering Students with AI-Powered Assessments & Intelligent Learning
Chapter Exam

Chapter-3 Stack — Online MCQ Test

COMPUTER SCIENCE · Grade 12 · CBSE(NCERT)

Practice Chapter-3 Stack with a free chapter-wise online MCQ test for CBSE(NCERT) Grade 12 COMPUTER SCIENCE. This chapter covers: stack - LIFO - Python lists - push - pop. AI-generated questions from basic to board-exam level, with instant results and explanations.

10
Questions
20m
Time Limit
3
Attempts Left
  • 10 random questions from this chapter (mixed difficulty)
  • Questions you've seen before won't repeat until the pool resets
  • You have 20 minutes — exam auto-submits when time is up
  • Maximum 3 attempts per chapter
  • Results and explanations shown immediately after submission
Login to Start This Exam →

New here? Register free — includes 3 free chapter exams.

Chapter-3 Stack — Important Questions & Answers (FAQ)

Frequently asked questions from CBSE(NCERT) Grade 12 COMPUTER SCIENCE — Chapter-3 Stack, with answers and explanations. These are sample questions; the exam has its own separate question set.

What does LIFO stand for in the context of a stack?
  • A. Last In First Out ✓
  • B. Linear In First Out
  • C. Last In For Output
  • D. Longest Input First Output
Answer: A. Last In First Out
LIFO is the fundamental principle of stack data structure where the last element inserted is the first one to be removed.
Which Python data structure is commonly used to implement a stack?
  • A. Dictionary
  • B. List ✓
  • C. Tuple
  • D. Set
Answer: B. List
Python lists provide append() and pop() methods that make them ideal for implementing stacks.
What will be the output of the following code? stack = [1, 2, 3, 4] stack.pop() print(len(stack))
  • A. 3 ✓
  • B. 4
  • C. 2
  • D. 1
Answer: A. 3
After pop(), one element is removed from the stack, reducing its length from 4 to 3.
What is the maximum number of elements that can be stored in a stack implemented using a Python list of size 10?
  • A. 10
  • B. 9
  • C. 11
  • D. Unlimited ✓
Answer: D. Unlimited
Python lists are dynamic and can grow beyond their initial size, so a stack can store unlimited elements.
What is the result of the following code sequence and why is it important? stack = [1, 2, 3] value = stack.pop() stack.append(value + 10) print(stack)
  • A. [1, 2, 3, 13] - demonstrates queue behavior
  • B. [1, 2, 13] - demonstrates modifying stack elements after popping ✓
  • C. [1, 2, 3, 10] - demonstrates push operation
  • D. Error - cannot perform arithmetic on popped elements
Answer: B. [1, 2, 13] - demonstrates modifying stack elements after popping
This demonstrates that after popping the top element (3), we can modify it and push it back, showing flexibility in stack manipulation.

Choose Your Plan & Start Practising

All plans cover every subject and chapter of your registered grade.

Free
₹0
3 exams · 1 year
Start Free →
Active
₹350
12 exams · 1 year
Get Active →
Pro
₹899
Unlimited exams · 1 year
Get Pro →

Compare all plans in detail →