Here, we will clear all your doubts with examples. Once you allocate memory for your temp node and setup its data, you link it to the queue via pointer assignments. if(sizefront = q->rear = tmp; ). That’s it. Here is a diagrammatic representation of how elements are deleted from a queue: Key takeaway: It is important to note that we used the function name “delet” instead of “delete” because “delete” is a keyword.