Example HTML page

DS – mcq on Stacks

The following are the objective questions on the topic related to stacks in data structures using C/C++.

1.What type of data structure does a Stack is?

  1. Linear
  2. non-linear
  3. both A&B
  4. none

Answer: A

2 .____________ is applied in stacks.

  1. FIRST-IN-LAST-OUT
  2. LAST-IN –FIRST-OUT
  3. both A&B
  4. None

Answer: B

3. Other names for the insertion and deletion operations in Stacks?

  1. PUSH – insertion, POP –Deletion.
  2. PUSH – Deletion, POP – Insertion.
  3. Both A and B are valid.
  4. Only A is true.

Answer: A/D

4.In stacks, the possibility to do insertion and deletion is ____

  1. At one end only
  2. at both ends
  3. Both A & B.
  4. None

Answer: A

5. The representation of stack can be done in ____________.

  1. One way
  2. Two ways
  3. Three
  4. none

Answer: B

6. Pick from the following which represents an element in a stack.

  1. SIZE
  2.  ITEM
  3. TOP
  4. BOTTOM

Answer: B

7. At which position in the stacks , the operations are being done.

  1. TOP
  2. SIZE
  3. POP
  4. PUSH

Answer:  A

8. It is impossible to do ___ operation on empty stack.

  1. PUSH
  2. POP
  3. STATUS
  4. None

Answer: B

9. From the following which are static and dynamic representations of stacks?

  1. Arrays – Static, Linked lists – Dynamic.
  2. Linked lists – Static, Arrays – Dynamic.
  3. Queues –Dynamic ,Arrays – Static
  4. None of the mentioned.

Answer: A

10.Is there possibility to add a node at front of the stacks without PUSH operation.

  1. YES
  2. NO

Answer:  B

11. Can we delete a node at front of a stack by using POP operation?

  1. YES
  2. NO

Answer:  A

12. Pick out the odd one which is not related to stacks.

  1. LIFO list
  2. FIFO list
  3. Push down lists.
  4. Piles

Answer: B

13.To implement Quick sort we use the concept of ____.

  1. Stack
  2. Set
  3. List
  4. Queue

Answer: A

14.The concept “Pile of Plates” is applicable in which one of the following.

  1. Stack
  2. Queue
  3. Linked list
  4. Tree

Answer: A

15. From the below listed options, which will you use to convert infix to postfix/prefix operators.

  1. A. Queue
  2. Stack
  3. Linked List
  4. Tree

Answer: B

 

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest