Q1:

2026: 21 May Shift 1

Stack

Easy

Computer Science

Match List-I with List-II

List-IList-II
ConceptDescription
(A) Stack(I) Pop an element from an empty stack
(B) Push(II) LIFO principle
(C) Pop(III) Insertion of elements
(D) Underflow(IV) Deletion of elements
Answer options
Option 1
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 1

Q2:

2026: 21 May Shift 1

Stack

Easy

Computer Science

Suppose the stack capacity is 4, and we are performing operations of PUSH, PUSH, PUSH, PUSH and POP, what will happen to the stack after these operations?

Answer options
Option 4
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 2

Q3:

2026: 20 May Shift 1

Stack

Easy

Computer Science

While converting an INFIX notation to its equivalent POSTFIX, ____ are PUSHed onto the stack.

Answer options
Option 3
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 3

Q4:

2026: 20 May Shift 1

Stack

Easy

Computer Science

The infix expression (a -b) / (c+d) converted to POSTFIX is :

Answer options
Option 2
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 4

Q6:

2026: 20 May Shift 1

Stack

Hard

Computer Science

The sequence of elements in the stack from top to bottom after operations PUSH, PUSH, PUSH, POP, PUSH, POP, PUSH, PUSH, PUSH, POP on the elements 10, 12, 8, 15, 5, 3, 6, 18, 9, 11 will be:

(A) 12

(B) 3

(C) 10

(D) 5

Answer options
Option 4
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 6

Q7:

2026: 19 May Shift 1

Stack

Medium

Computer Science

Assume P, D, Q, R is the input sequence for a STACK.

Arrange the given operation to get the output as shown in the STACK below:

STACK
R
Q
P

(A) POP(D)

(B) PUSH(P)

(C) PUSH(D)

(D) PUSH(R)

(E) PUSH(Q)

Answer options
Option 2
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 7

Q8:

2026: 19 May Shift 1

Stack

Medium

Computer Science

Arrange the following statements for conversion from infix to postfix expression.

(A) If the symbol is an operand, put it into the output postfix string.

(B) Print the output postfix string.

(C) Scan the infix expression from left to right.

(D) If the symbol is an operator, check its precedence with the operator at top of stack.

(E) If the symbol has low precedence, pop the operator from the stack and append to the output postfix string.

Answer options
Option 1
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 8

Q10:

2026: 19 May Shift 1

Stack

Easy

Computer Science

What will be the output of the following python code?

result=0

nstack=[40,70,80]

nstack.append(50)

result=result+nstack.pop()

nstack.append(30)

result=result+nstack.pop()

print("Result=", result)

Answer options

Q12:

2026: 18 May Shift 2

Stack

Easy

Computer Science

While conversion of an Infix notation to its equivalent Prefix/Postfix notation, only ________ are ______ onto the stack.

Answer options

Q13:

2026: 18 May Shift 2

Stack

Easy

Computer Science

Python built in functions ___________ and _____________ of list can be used to implement PUSH and POP respectively in a stack.

Answer options

Q14:

2026: 18 May Shift 2

Stack

Medium

Computer Science

Which of the following statements are TRUE about postfix notation?

A. It is also known as Reverse Polish Notation.

B. Operators are placed between operands.

C. Parentheses are not required.

D. Operands are placed after the corresponding operators.

Answer options

Q16:

2026: 13 May Shift 2

Stack

Easy

Computer Science

Match List-I with List-II

List-IList-II
(A) ENQUEUE(I) remove one element at a time from the front of the queue
(B) PUSH(II) insert a new element to the queue at the rear end
(C) POP(III) adds a new element at the top of the stack
(D) DEQUEUE(IV) removes the top most element of the stack
Answer options

Q17:

2026: 13 May Shift 2

Stack

Medium

Computer Science

Sumit wants to initially check the underflow condition in a stack before deleting an element from it. Which of the following are the correct options for it?

(A)

def isEmpty(stack):

if len(stack)==0:

print("underflow")

(B)

def isEmpty(stack):

if !(stack):

print("underflow")

(C)

def isEmpty(stack):

if stack==[] :

print("underflow")

(D)

def isEmpty(stack):

if len(stack)==None:

print("underflow")

Answer options

Q18:

2026: 13 May Shift 2

Stack

Medium

Computer Science

Uday starts learning the application of STACK which are:

(A) To reverse a string.

(B) To match the parenthesis in an arithmetic expression.

(C) For spooling printer jobs.

(D) To trace back the last visited web page on a website by using BACK button of the browser.

Answer options

Q19:

2026: 11 May Shift 2

Stack

Easy

Computer Science

Select the incorrect statement in the context of a stack.

Answer options

Q20:

2026: 11 May Shift 2

Stack

Medium

Computer Science

Which of the following statement is correct?

Answer options

Q21:

2026: 11 May Shift 2

Stack

Easy

Computer Science

Consider the following operations performed on a stack of size 5.

PUSH(17), POP(), PUSH(12), PUSH(13), POP(), PUSH(41), POP(), POP(), PUSH(54)

After the completion of all operations , the number of elements present in the stack are:

Answer options

Q23:

2025: 3 June Shift 2

Stack

Easy

Computer Science

If the elements "red", "blue", "green" and "yellow" are inserted in a stack in order. Select from the option given below, as they are deleted from the stack one at a time:-

(A) red

(B) blue

(C) green

(D) yellow

Answer options

Q24:

2025: 3 June Shift 2

Stack

Easy

Computer Science

Which of the following condition occurs, if one tries to insert an element in already full stack?

Answer options

Q25:

2025: 3 June Shift 2

Stack

Easy

Computer Science

Which of the following statements are TRUE about the stack?

(A) Stack is a linear list.

(B) It is LIFO list.

(C) The insertion and deletion can happen at both ends.

(D) The value top=-1 indicates the stack is empty.

Answer options

Q26:

2025: 30 May Shift 2

Stack

Medium

Computer Science

Find the output of the code:

answer=[ ]

output=' '

answer.append('F')

answer.append('I')

answer.append('L')

ch=answer.pop()

output=output+ch

ch=answer.pop()

output=output+ch

ch=answer.pop()

output=ch

print(“Result=”,output)

Answer options

Q27:

2025: 30 May Shift 2

Stack

Easy

Computer Science

Fill the blanks with suitable combinations:

(Note: While browsing the web, we move from one web page to another by accessing links between them. In order to go back to the last visited web page, we may use the back button on the browser.)

Let us say we accessed a web page P1 from where we moved to web page P2 followed by browsing of web page P3.

Currently, we are on web page ____ and want to revisit web page P1. We may go to a previously visited web page by using the _____ button of the browser. On clicking the ____ button ____, we are taken from web page P3 to web page P2, another click on back shows web page ____. In this case, the history of browsed pages is maintained as stack.

Answer options

Q28:

2025: 30 May Shift 2

Stack

Easy

Computer Science

Identify the type of expression where operators are placed after the corresponding operands like x y * z +; 3 4 5 + *; x y + z 5 * /

Answer options

Q29:

2025: 27 May Shift 2

Stack

Easy

Computer Science

Which of the following condition will occur if one tries to delete an element from Empty STACK ?

Answer options

Q30:

2025: 27 May Shift 2

Stack

Easy

Computer Science

IF STACK 'S' is implemented with the list, having elements [23,24,35,37], The TOP of the STACK element is 37. After that, the following operations take place in sequence.

  1. PUSH(40)
  2. PUSH(43)

3.POP( )

  1. PUSH(56)

What will be the order of elements in the STACK 'S' after the completion of the above operations?

Answer options