Remove the elements in order of decreasing priority.
Hint: In the priority queue, since all elements would be arranged in descending order of priority so, remove the first element first, as it would have the highest priority.
Expected Result:
display : Priority : 4Value : 10
display : Priority : 5Value : 15
display : Priority : 8Value : 20
display : End
dequeue : Begin
dequeue.c : dequeue : Element to be dequed : 4-> 10
dequeue : End
dequeue : Begin
dequeue.c : dequeue : Element to be dequed : 5-> 15
dequeue : End
Note : Make sure you also free the associated memory using free().