Stack Implementation Using Array Pretest


Answer the multiple-choice questions below to test your knowledge!


Multiple-Choice Questions:

  1. What is the primary operation of a stack?





  2. Which operation is used to add an element to the stack?





  3. What happens when you try to pop an element from an empty stack?





  4. Which operation allows you to view the top element of the stack without removing it?





  5. What is the time complexity of the push and pop operations in a stack implemented using an array?