Multiple choice general knowledge

If you have an empty stack that can contain letters, and you push (in order) these letters onto it, what order will they be in when you pop them off? 't' 'a' 'p'

  1. There is no way to tell

  2. t,a,p

  3. a,t,p

  4. p,a,t

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A stack follows LIFO (Last In First Out) principle. When you push t, then a, then p onto an empty stack, p is on top. Popping removes p first, then a, then t, giving the order p,a,t. This is the reverse of the push order.