If it is false then rear=(newly created node) and rear node always contains the address of the front node. Check if (front==rear) if it is true then set front = rear = NULL else move the front forward...If it is false then rear=(newly created node) and rear node always contains the address of the front node. Check if (front==rear) if it is true then set front = rear = NULL else move the front forward in queue, update address of front in rear node and return the element. This is the same as the non-circular EXCEPT that you must update the rear->next value to point to the head when you qRemove(), and set the new rear->next when you qInsert().