12th Class Computers Science Sample Paper Data Structure - Sample Paper-1

  • question_answer
    Consider a Stack with TOP=8 and Size = 9
    What will be the value of TOP when an element is insert from the stack.

    A) 9        

    B) 8     

    C) overflow           

    D) underflow

    Correct Answer: C

    Solution :

    [c] At starting the value of TOP is 8 and the size is given as 9 that it is full stack and if you try to insert an element into full stack, then it will give "overflow". But it cannot change the value of TOP and the final value of TOP is 8.


You need to login to perform this action.
You will be redirected in 3 sec spinner