📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    If a stack is implemented using a fixed-size array, what

    is a significant disadvantage when the stack grows beyond its initial capacity?
    A Increased memory overhead Correct Answer Incorrect Answer
    B Slower access time for elements Correct Answer Incorrect Answer
    C Stack overflow error Correct Answer Incorrect Answer
    D Inability to perform `pop` operations Correct Answer Incorrect Answer
    E Reduced cache performance Correct Answer Incorrect Answer

    Solution

    A fixed-size array implementation of a stack will lead to a "stack overflow" error if more elements are pushed than the array can hold, as it cannot dynamically resize.

    Practice Next
    ask-question