Which element would get first deleted from the stack?
2018
Which element would get first deleted from the stack?
- A.
The element in the middle of the stack
- B.
Any specified element
- C.
The element at the bottom of the stack
- D.
The element at the top of the stack
Attempted by 266 students.
Show answer & explanation
Correct answer: D
The correct option is D. A stack is a linear data structure that follows the Last-In, First-Out (LIFO) principle. This means the element added most recently is placed at the top and is the first one to be removed during a pop (deletion) operation.