IN C ONLY (follow instruction please)
Implement the following functions:
Queue * initQueue( ) // Return empty queue
// enqueue and dequeue each return an int error code
int enqueue(int, Queue *)
int dequeue(Queue *, int *)
int getQsize(Queue *) // returns # of items inqueue
void freeQueue(Queue *) // Free *all* space
Implement the above using a circular-linked list. Again, alloperations except freeQueue should take O(1) time.
You will need to document each of your functions to inform theuser how to use it and how to interpret its return value. Note thatdequeue places the integer removed from the front of the queue intothe location specified by the reference provided by the user (thesecond parameter). Note also that error conditions can arise forboth enqueue and dequeue.
Also, try implementing the above with a doubly-circular-linkedlist. Does it make things easier or harder?