0% found this document useful (0 votes)
60 views13 pages

Stack MCQ: Jayaram P Cdac

The document contains a multiple choice quiz about stacks. It includes questions about the processes of inserting and removing elements from a stack, what happens when trying to remove an element from an empty stack, what data structure is used to check balanced parentheses, what data structure is used in non-recursive implementations of recursive algorithms, the prefix form of an infix expression, applications of stacks, and the worst case time complexity of push and pop operations in an array implementation of a stack.

Uploaded by

Patil Vinayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views13 pages

Stack MCQ: Jayaram P Cdac

The document contains a multiple choice quiz about stacks. It includes questions about the processes of inserting and removing elements from a stack, what happens when trying to remove an element from an empty stack, what data structure is used to check balanced parentheses, what data structure is used in non-recursive implementations of recursive algorithms, the prefix form of an infix expression, applications of stacks, and the worst case time complexity of push and pop operations in an array implementation of a stack.

Uploaded by

Patil Vinayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

STACK

MCQ
Jayaram P
CDAC

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

a) Create
b) Push
c) Evaluation
d) Pop

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


a) Create
b) Push
c) Evaluation
d) Pop

3 May 2022 Knowledge Resource Centre 2


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

2. The data structure required to check whether an expression contains a balanced


parenthesis is?

a) Stack
b) Queue
c) Array
d) Tree

3 May 2022 Knowledge Resource Centre 3


3. What data structure would you mostly likely see in non recursive implementation of a
recursive algorithm?

a) Linked List
b) Stack
c) Queue
d) Tree

3 May 2022 Knowledge Resource Centre 4


3 May 2022 Knowledge Resource Centre 5
Answer

3 May 2022 Knowledge Resource Centre 6


The prefix form of an infix expression p + q - r * t is?

a) + pq - *rt
b) - +pqr * t
c) - +pq * rt
d) - + * pqrt

3 May 2022 Knowledge Resource Centre 7


Which of the following is not an inherent application of stack?

a) Reversing a string
b) Evaluation of postfix expression
c) Implementation of recursion
d) Job scheduling

3 May 2022 Knowledge Resource Centre 8


Which of the following operation take worst case linear time in the array
implementation of stack?

a) Push
b) Pop
c) IsEmpty
d) None

3 May 2022 Knowledge Resource Centre 9


Which of the following application generally use a stack?

a) Parenthesis balancing program


b) Syntax analyzer in compiler
c) Keeping track of local variables at run time
d) All of the above

3 May 2022 Knowledge Resource Centre 10


*

3 May 2022 Knowledge Resource Centre 11


Answer

3 May 2022 Knowledge Resource Centre 12


THANK YOU
jayaram@cda
c.in

3 May 2022 Knowledge Resource Centre 13

You might also like