In an array implementation of the stack, where does the push operation take…

2023

In an array implementation of the stack, where does the push operation take place?

  1. A.

    At the start of the array

  2. B.

    At the end of the array

  3. C.

    At the middle of the array

  4. D.

    At any point in the array

Attempted by 453 students.

Show answer & explanation

Correct answer: B

In an array implementation of the stack, the push operation adds an element at the end of the array, which is considered as the top of the stack.

Explore the full course: Cocubes Preparation