100+Stack Operations Questions and Answers

The practice tests and questions provided in this app will help you prepare effectively for your upcoming entrance exam and help you crack the exam.  The question and answers here are designed and formatted just like the real exam, to give you the best preparation possible. These Stack Operations Questions and Answer will help you prepare for any exam including BCA, MCA, GATE, GRE, IES, PSC, UGC NET, DOEACC Exams at all levels – you just have to practice regularly

Stack Operations Questions and Answers.

1. Process of inserting an element in stack is called ____________

a) Create

b) Push

c) Evaluation

d) Pop

Answer: Push

2. Process of removing an element from stack is called __________

a) Create

b) Push

c) Evaluation

d) Pop

Answer: Pop

3. In a stack, if a user tries to remove an element from an empty stack it is called _________

a) Underflow

b) Empty collection

c) Overflow

d) Garbage Collection

Answer: Underflow

4. Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________

a) Overflow

b) Crash

c) Underflow

d) User flow

Answer: Overflow

5. Entries in a stack are “ordered”. What is the meaning of this statement?

a) A collection of stacks is sortable

b) Stack entries may be compared with the ‘<‘ operation

c) The entries are stored in a linked list

d) There is a Sequential entry that is one by one

Answer: There is a Sequential entry that is one by one

6. Which of the following is not the application of stack?

a) A parentheses balancing program

b) Tracking of local variables at run time

c) Compiler Syntax Analyzer

d) Data Transfer between two asynchronous process

Answer: Data Transfer between two asynchronous process

7. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?

a) 1

b) 2

c) 3

d) 4 or more

Answer: 3

8. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

a) 1

b) 2

c) 3

d) 4 or more

Answer: 2

9. What is the value of the postfix expression 6 3 2 4 + – *?

a) 1

b) 40

c) 74

d) -18

Answer: -18

10. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation. The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?

a) 1

b) 2

c) 3

d) 4

Answer: 4

More Questions on Abstract Data Types (Data Structure)

100+ Array and Array Operations MCQs and Answers
100+ Stack Operations MCQs and Answers
100+ Queue Operations MCQs and Answers
100+ Singly Linked Lists MCQs and Answers
100+ Linked Lists Operations MCQs and Answers
100+ Doubly Linked Lists MCQs and Answers
100+ Circular Linked Lists MCQs and Answers
100+ Stack using Array MCQs and Answers
100+ Stack using Linked List MCQs and Answers
100+ Queue using Array MCQs and Answers
100+ Queue using Linked List MCQs and Answers
100+ Priority Queue MCQs and Answers
100+ Double Ended Queue MCQs and Answers
100+ Queue using Stacks MCQs and Answers
100+ Stack using Queues MCQs and Answers

Comments