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

  • question_answer
    Consider a Queue with rear=front=-1 and Size = 9 What will be the value of front and rear when an element is deleted from the queue.

    A) 0         

    B) 1     

    C) -1        

    D) underflow

    Correct Answer: D

    Solution :

    [d] At starting the value of front and rear is -1 that it is an empty queue and if you try to delete an element from empty queue, then it will give "underflow". But it cannot change the value of front and rear, so, the final value is -1.


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