• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Stack Data Structure with Answers

Question 21

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

  • Implementation of recursion

  • Evaluation of a postfix expression

  • Job scheduling

  • Reverse a string

Question 22

Convert the following infix expression into its equivalent post fix expression (A + B^ D) / (E – F) + G
  • ABD^ + EF – / G+
  • ABD + ^EF – / G+
  • ABD + ^EF / – G+
  • ABD^ + EF / – G+

Question 23

Consider the following sequence of operations on an empty stack.

Push(54);push(52);pop();push(55);push(62);s=pop(); 

Consider the following sequence of operations on an empty queue.

enqueue(21);enqueue(24);dequeue();enqueue(28);enqueue(32);q=dequeue(); 

The value of s+q is ___________.

  • 86

  • 68

  • 24

  • 94

Question 24

Which of the following is true about linked list implementation of stack?
  • In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end.
  • In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning.
  • Both of the above
  • None of the above

Question 25

Which one of the following is an application of Stack Data Structure?
  • Managing function calls
  • The stock span problem
  • Arithmetic expression evaluation
  • All of the above

Question 26

The five items: A, B, C, D, and E are pushed in a stack, one after other starting from A. The stack is popped four items and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
  • A
  • B
  • C
  • D

Question 27

Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can be only be printed. In this arrangement, which of the following permutations of a, b, c are not possible?
  • b a c
  • b c a
  • c a b
  • a b c

Question 28

The five items: A, B, C, D, and E are pushed in a stack, one after other starting from A. The stack is popped four items and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
  • A
  • B
  • C
  • D

Question 29

Consider the following statements:

i.   First-in-first out types of computations are efficiently supported by STACKS.
ii. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.
iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.
iv. Last-in-first-out type of computations are efficiently supported by QUEUES.

Which of the following is correct?

  • (ii) is true

  • (i) and (ii) are true

  • (iii) is true

  • (ii) and (iv) are true

Question 30

The minimum number of stacks needed to implement a queue is

  • 3

  • 1

  • 2

  • 4

There are 30 questions to complete.

Last Updated :
Take a part in the ongoing discussion