Operating System

Wednesday, April 22, 2015

Queue *Q = createQueue(5);
Enqueue(Q,1);
Enqueue(Q,2);
Enqueue(Q,3);
Enqueue(Q,4);
Enqueue(Q,5);
Dequeue(Q);
Dequeue(Q);
printf("Front element is %d\n",front(Q));
What is the output for above program ?

Leave a Comment
Queue *Q = createQueue(5);
Enqueue(Q,1);
Enqueue(Q,2);
Enqueue(Q,3);
Enqueue(Q,4);
Enqueue(Q,5);
Dequeue(Q);
Dequeue(Q);
printf("Front element is %d\n",front(Q));
What is the output for above program ?
5
3
2
4
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment