A stack functions on the Last In First Out (LIFO) principle. Consequently, the most recently inserted element is the first to be retrieved. This concept is commonly illustrated with a stack of plates, where additions and removals are restricted to the uppermost plate. The stack data structure primarily supports operations at a single extremity:
This mechanism guarantees that the most recently inserted element is accessed first, thereby upholding the LIFO methodology.
| List-I (Term) | List-II (Description) |
| (A) Prefix | (I) In this, the element entered first will be removed last |
| (B) Postfix | (II) In this, the element entered first will be removed first. |
| (C) Queue | (III) In this, the operator is placed before the operands. |
| (D) Stack | (IV) In this, the operator is placed after the operands. |