Exam-style question
Try this first
Which operation adds a new value to the top of a stack?.
- A.push
- B.pop
- C.peek
- D.test for empty
Model answer
What a good answer should say
- push
Explanation
Why this works
The push operation adds a value to the top of the stack.
Common mistake
No common mistake is linked to this question yet.
