Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 12
Computer Science
Computer Science
Stack
Question Bank

Question Bank - Stack

Practice Hub

Question Bank: Stack

This chapter discusses stacks, a linear data structure that follows the Last-In-First-Out principle. It covers operations on stacks, their implementation in Python, and their applications.

Structured practice

Question Bank - Stack

Q1.

What does LIFO stand for in the context of a stack?

Single Answer MCQ
Q-00094726
View explanation
Q2.

Which of the following operations is NOT typically associated with a stack?

Single Answer MCQ
Q-00094727
View explanation
Q3.

In which scenario would using a stack be most appropriate?

Single Answer MCQ
Q-00094728
View explanation
Q4.

What would happen if you attempt to pop an element from an empty stack?

Single Answer MCQ
Q-00094729
View explanation
Q5.

Which statement accurately describes a stack's structure?

Single Answer MCQ
Q-00094730
View explanation
Q6.

If a stack currently contains elements A, B, and C (with C on top), what will the stack contain after performing one pop operation?

Single Answer MCQ
Q-00094731
View explanation
Q7.

What is the main advantage of using a stack?

Single Answer MCQ
Q-00094732
View explanation
Q8.

In Python, which data type can be used to implement a stack?

Single Answer MCQ
Q-00094733
View explanation
Q9.

What is the result of evaluating the postfix expression '3 4 + 2 *'?

Single Answer MCQ
Q-00094734
View explanation
Q10.

What would be the output of calling pop on a stack with the elements [1, 2, 3]?

Single Answer MCQ
Q-00094735
View explanation
Q11.

How do you visualize a stack in real life?

Single Answer MCQ
Q-00094736
View explanation
Q12.

What distinguishes a stack from a queue?

Single Answer MCQ
Q-00094737
View explanation
Q13.

In which of the following applications would a stack be least useful?

Single Answer MCQ
Q-00094738
View explanation
Q14.

Which method would you use to add an element to the top of a stack in Python?

Single Answer MCQ
Q-00094739
View explanation
Q15.

What is the result of attempting to pop from a stack that is already empty?

Single Answer MCQ
Q-00094740
View explanation
Q16.

What is the primary operation used to add an element to a stack?

Single Answer MCQ
Q-00094755
View explanation
Q17.

Which of the following follows the LIFO principle?

Single Answer MCQ
Q-00094756
View explanation
Q18.

If a stack contains the elements [A, B, C] from bottom to top, what will be the stack after performing one Pop operation?

Single Answer MCQ
Q-00094757
View explanation
Q19.

Which function is used to check if a stack is empty?

Single Answer MCQ
Q-00094758
View explanation
Q20.

What will be the top element of the stack after executing the following operations? (Initialize stack, Push A, Push B, Push C)

Single Answer MCQ
Q-00094759
View explanation
Q21.

Given a stack implementation, what will the stack contain after the following operations: Push(1), Push(2), Pop(), Push(3)?

Single Answer MCQ
Q-00094760
View explanation
Q22.

Which of the following statements about stacks is false?

Single Answer MCQ
Q-00094761
View explanation
Q23.

In a postfix expression evaluation algorithm using a stack, what happens when an operator is encountered?

Single Answer MCQ
Q-00094762
View explanation
Q24.

What will be the result of evaluating the postfix expression '5 6 2 + *'?

Single Answer MCQ
Q-00094763
View explanation
Q25.

If an attempt is made to Pop an element from an empty stack, what is the expected outcome?

Single Answer MCQ
Q-00094764
View explanation
Q26.

What is the output of the following code snippet? stack = [] stack.append(1) stack.append(2) print(stack.pop()) stack.append(3) print(stack)

Single Answer MCQ
Q-00094765
View explanation
Q27.

Which of the following is NOT a characteristic of a stack?

Single Answer MCQ
Q-00094766
View explanation
Q28.

What will happen if you keep pushing elements onto a stack with a fixed size?

Single Answer MCQ
Q-00094767
View explanation
Q29.

When implementing a stack using linked lists, which part of the node would represent the top of the stack?

Single Answer MCQ
Q-00094768
View explanation
Q30.

Which algorithm can be used to convert infix expressions to postfix using a stack?

Single Answer MCQ
Q-00094769
View explanation
Q31.

What is the primary operation used to add an element to a stack?

Single Answer MCQ
Q-00094770
View explanation
Q32.

What happens when you perform a POP operation on an empty stack?

Single Answer MCQ
Q-00094771
View explanation
Q33.

Which of the following statements about stacks is true?

Single Answer MCQ
Q-00094772
View explanation
Q34.

What is likely to occur if you attempt to PUSH an element onto a full stack?

Single Answer MCQ
Q-00094773
View explanation
Q35.

In the context of stacks, what does LIFO stand for?

Single Answer MCQ
Q-00094774
View explanation
Q36.

How would you check if a stack is empty in Python?

Single Answer MCQ
Q-00094775
View explanation
Q37.

Assuming a stack contains the elements: 10, 20, 30. What will be the result after performing one POP operation?

Single Answer MCQ
Q-00094776
View explanation
Q38.

Which command would you use to add an element to a stack stored in a list in Python?

Single Answer MCQ
Q-00094777
View explanation
Q39.

What would be the state of a stack after performing a series of operations: PUSH(1), PUSH(2), POP(), PUSH(3)?

Single Answer MCQ
Q-00094778
View explanation
Q40.

What structure is primarily used to check for balanced parentheses in expressions?

Single Answer MCQ
Q-00094779
View explanation
Q41.

In the implementation of a stack using a list, which method is used to remove the top element?

Single Answer MCQ
Q-00094780
View explanation
Q42.

What is a correct way to define a stack in Python using a list?

Single Answer MCQ
Q-00094781
View explanation
Q43.

Identify the maximum depth of recursion that can be achieved with a stack structure.

Single Answer MCQ
Q-00094782
View explanation
Q44.

When would you encounter a stack overflow while using stacks?

Single Answer MCQ
Q-00094783
View explanation
Q45.

If a stack is implemented using a linked list, where are elements added?

Single Answer MCQ
Q-00094784
View explanation
Q46.

Which of the following expressions would lead to underflow in a stack?

Single Answer MCQ
Q-00094785
View explanation
Q47.

What is the result of performing two consecutive POP operations on the stack containing elements 40, 50, 60?

Single Answer MCQ
Q-00094786
View explanation
Q48.

If a programming language uses a separate stack for function calls, what issue can arise if the stack size is exceeded?

Single Answer MCQ
Q-00094787
View explanation
Q49.

What is infix notation?

Single Answer MCQ
Q-00094788
View explanation
Q50.

In postfix notation, how would the expression 2 + 3 be represented?

Single Answer MCQ
Q-00094789
View explanation
Q51.

Which of the following expressions uses prefix notation?

Single Answer MCQ
Q-00094790
View explanation
Q52.

What is the primary advantage of using postfix notation?

Single Answer MCQ
Q-00094791
View explanation
Q53.

Which of the following is a characteristic of prefix notation?

Single Answer MCQ
Q-00094792
View explanation
Q54.

How would the infix expression (A + B) * C be written in postfix notation?

Single Answer MCQ
Q-00094793
View explanation
Q55.

What would be the postfix notation for the expression (x + y) * (z - w)?

Single Answer MCQ
Q-00094794
View explanation
Q56.

If the expression A - B + C is processed, which of the following represents its correct postfix form?

Single Answer MCQ
Q-00094795
View explanation
Q57.

Which notation removes the need for parentheses altogether?

Single Answer MCQ
Q-00094796
View explanation
Q58.

What is a key feature of operator precedence in infix notation?

Single Answer MCQ
Q-00094797
View explanation
Q59.

When converting infix to postfix, which data structure is primarily used?

Single Answer MCQ
Q-00094798
View explanation
Q60.

What will be the postfix notation for the infix expression A + (B * C)?

Single Answer MCQ
Q-00094799
View explanation
Q61.

Given the infix expression A * (B + C) - D, what is its postfix equivalent?

Single Answer MCQ
Q-00094800
View explanation
Q62.

In context of arithmetic expressions, which of the following statements is true about operator precedence?

Single Answer MCQ
Q-00094801
View explanation
Q63.

Which is true regarding the evaluation of postfix expressions?

Single Answer MCQ
Q-00094802
View explanation
Q64.

Which principle does a stack operate on?

Single Answer MCQ
Q-00094803
View explanation
Q65.

Which method is used to add an element to a stack in Python using lists?

Single Answer MCQ
Q-00094804
View explanation
Q66.

What will happen if you try to pop an element from an empty stack?

Single Answer MCQ
Q-00094805
View explanation
Q67.

How can you check if a stack implemented using a list is empty in Python?

Single Answer MCQ
Q-00094806
View explanation
Q68.

Which of the following is NOT a valid function to implement in a stack?

Single Answer MCQ
Q-00094807
View explanation
Q69.

Which code snippet correctly defines the size function for a stack in Python?

Single Answer MCQ
Q-00094808
View explanation
Q70.

What is the output of top() when called on an empty stack?

Single Answer MCQ
Q-00094809
View explanation
Q71.

If the stack contains the elements [1, 2, 3], what will be the result of opPop()?

Single Answer MCQ
Q-00094810
View explanation
Q72.

Given these stack operations, opPush(5), opPush(10), opPop(), opPush(20), what is the stack's top element after these operations?

Single Answer MCQ
Q-00094811
View explanation
Q73.

What programming structure allows the implementation of a stack using Python's list?

Single Answer MCQ
Q-00094812
View explanation
Q74.

Which of the following statements is true about stack implementation?

Single Answer MCQ
Q-00094813
View explanation
Q75.

What does the opPop function do in the context of a stack?

Single Answer MCQ
Q-00094814
View explanation
Q76.

If a stack has 3 elements, what would the size function return?

Single Answer MCQ
Q-00094815
View explanation
Q77.

If a programmer needs to implement a stack but wants to ensure no more than one item is in the stack at a time, which approach would they take?

Single Answer MCQ
Q-00094816
View explanation
Q78.

How can a stack be utilized in function call management?

Single Answer MCQ
Q-00094817
View explanation
Q79.

What is the primary purpose of converting an infix expression to postfix notation?

Single Answer MCQ
Q-00094818
View explanation
Q80.

In the algorithm for infix to postfix conversion, what data structure is primarily used to keep track of operators?

Single Answer MCQ
Q-00094819
View explanation
Q81.

Which of the following correctly represents the infix expression 'A + B * C' in postfix notation?

Single Answer MCQ
Q-00094820
View explanation
Q82.

During infix to postfix conversion, when should an operator be popped from the stack to the output?

Single Answer MCQ
Q-00094821
View explanation
Q83.

Which operator has the highest precedence in the context of infix expressions?

Single Answer MCQ
Q-00094822
View explanation
Q84.

What will be the postfix notation for the infix expression '(A + B) * C'?

Single Answer MCQ
Q-00094823
View explanation
Q85.

In converting infix to postfix, how do you handle parentheses?

Single Answer MCQ
Q-00094824
View explanation
Q86.

What is the postfix equivalent of the expression 'A * (B + C) - D'?

Single Answer MCQ
Q-00094825
View explanation
Q87.

Which of the following expressions is not correctly converted to postfix?

Single Answer MCQ
Q-00094826
View explanation
Q88.

Which condition requires the operator to stay on the stack without being popped?

Single Answer MCQ
Q-00094827
View explanation
Q89.

What is an advantage of postfix notation over infix notation?

Single Answer MCQ
Q-00094828
View explanation
Q90.

Which method can be used to verify the correctness of the postfix expression after conversion?

Single Answer MCQ
Q-00094829
View explanation
Q91.

If an infix expression is 'X + Y * Z - A / B', what will be the first operator to be popped in the conversion to postfix?

Single Answer MCQ
Q-00094830
View explanation
Q92.

In the expression 'A + B - C + D', what will be the postfix notation?

Single Answer MCQ
Q-00094831
View explanation
Q93.

The expression '(A * (B + C) - D) / E' converts to postfix as which of the following?

Single Answer MCQ
Q-00094832
View explanation
Q94.

What does a Stack data structure follow?

Single Answer MCQ
Q-00094833
View explanation
Q95.

In evaluating the postfix expression '5 1 2 + 4 * + 3 -', what is the first operation after processing '1 2'?

Single Answer MCQ
Q-00094834
View explanation
Q96.

Which data structure is used to evaluate postfix expressions?

Single Answer MCQ
Q-00094835
View explanation
Q97.

What is the result of evaluating '2 3 4 * +' using a stack?

Single Answer MCQ
Q-00094836
View explanation
Q98.

If a stack has elements '10 20 30', what will be the result after evaluating '10 20 + 30 -'?

Single Answer MCQ
Q-00094837
View explanation
Q99.

In postfix evaluation, what happens if two operands are followed by an operator?

Single Answer MCQ
Q-00094838
View explanation
Q100.

If evaluating a postfix expression leads to a stack that has more than one element left, what does that indicate?

Single Answer MCQ
Q-00094839
View explanation
Q101.

How would you identify an operand in a postfix expression?

Single Answer MCQ
Q-00094840
View explanation
Q102.

What is the postfix representation of the infix expression '(A + B) * C'?

Single Answer MCQ
Q-00094841
View explanation
Q103.

After pushing '5' onto an empty stack and then pushing '3', what will be the top of the stack?

Single Answer MCQ
Q-00094842
View explanation
Q104.

If you encounter an operator with no operands available in the stack during evaluation, what should you do?

Single Answer MCQ
Q-00094843
View explanation
Q105.

What will the final value of a postfix evaluation be if you evaluate '4 5 6 * +'?

Single Answer MCQ
Q-00094844
View explanation
Q106.

What will happen if you attempt to pop from an empty stack during postfix evaluation?

Single Answer MCQ
Q-00094845
View explanation
Q107.

In a valid postfix expression, how many operands must an operator encounter?

Single Answer MCQ
Q-00094846
View explanation
Q108.

If the postfix expression '8 3 4 2 * 1 - +' is evaluated, what is the final result?

Single Answer MCQ
Q-00094847
View explanation
Learn Better On The App
Practice-first experience

Practice Makes Perfect

Sharpen concepts with MCQs, quizzes, and focused topic-based practice.

Endless questions
Topic-wise prep

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview