Question Question Content Learning Objective(if
No Provided)
Sl.No Question Learning Objective
1 What is the process of inserting data into a stack called? Knowledge
A. Create
B. Insert
C. Push
D. Evaluate
2 What is the process of deleting data from a stack called? Knowledge
A. Drop
B. Delete
C. Erase
D. Pop
3 Which data structure works on the principle of LIFO? Knowledge
A. Linear List
B. Stack
C. Queue
D. Tree
4 Which pointer is associated with a stack? Knowledge
A. First
B. Front
C. Rear
D. Top
5 Assume a stack has size 4. If a user tries to push a fifth Understanding
element to a stack, which of the mentioned condition will
arise?
A. Underflow
B. Overflow
C. Crash
D. Successful Insertion
6 If a user tries to pop an empty stack, which of the Understanding
mentioned condition will arise?
A. Empty data
B. Overflow
, C. Underflow
D. No error
7 Which of the following condition is necessary for Analysis
checking a stack st is full in Python?
A. Top ==len(st)
B. Top ==len(st)-1
C. Top < len(st)
D. Top ==st
8 Assume a stack Stk implemented as a list. Predict the Analysis
output of the following code.
def push_char(ch):
Stk.append(ch)
def display_stk():
strdata=""
if len(Stk)==0:
print("Empty Stack")
else:
for i in Stk:
strdata+=i
print(strdata[::-1])
push_char('c')
push_char('b')
push_char('s')
push_char('e')
push_char('2')
push_char('0')
push_char('2')
push_char('1')
A. 1202esbc
B. cbse2021
C. 1
D. s
9 Which of these is not an application of stack? Application
A. Parenthesis Balancing program
, B. Evaluating Arithmetic Expressions
C. Reversing Data
D. Data Transfer between Process
10 Predict the output of the following code: Application
def insert_data(stk,num):
stk.append(num)
stk=[2,3,4]
insert_data(stk,10)
print(stk)
A. [2,3,4,10]
B. [10,2,3,4]
C. Overflow
D. Underflow
11 Predict the output of the following code: Application
def push(stk,num):
stk.append(num)
def pop():
if len(stk)==0:
print(“Underflow”)
else:
stk.pop()
stk=[10,100,-1,2,4]
push(stk,200)
pop()
pop()
pop()
push(stk,4)
print(stk[-1])
A. 200
B. 100
C. -1
D. 4
12 The contents of a stack st are as shown in the figure. Analysis
Mention the value of Top after a series of these
operations:
Push(st,9)
Pop()
, Pop()
Pop()
Push(st,-1)
A. 1
B. 2
C. 3
D. 4
13 Choose correct output for the following sequence of Analysis
operations.
push(5)
push(8)
pop
push(2)
push(5)
pop
pop
pop
push(1)
pop
A. 8 5 2 51
B. 8 5 5 2 1
C. 8 2 5 5 1
D. 8 1 2 5 5
14 What is the value of the postfix expression 6 3 2 4 + – *? Evaluation
A. -18
B. 1
C. 40
D. 72
15 Which is the correct way to create a stack of numbers Creation
with contents 8,10 and 100, in Python?
A. Stack=(8,10,100)
B. Stack =[8,10,100]