Which of the following conditions indicates that an array-based stack is full when using zero-based indexing?
Options
- A. TOP = 0
- B. TOP = MAX - 1
- C. TOP = -1
- D. More than one of the above
- E. None of the above
Quiz Practice:
B. TOP = MAX - 1
Correct Answer: B. TOP = MAX - 1
Explanation: In an array-based stack of capacity MAX using zero-based indexing, the last valid index is MAX - 1.