Which operation is used to insert an element into a stack?

Options

  • A. Pop
  • B. Peek
  • C. Push
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. Push

Detailed Explanation

Correct Answer: C. Push

Explanation: Push is the operation used to insert a new element at the top of a stack.

  • Push: Inserts an element.
  • Pop: Removes the top element.
  • Peek: Returns the top element without removing it.