It's an exercise from CLRS 3rd:
10.2-3 Implement a queue by a singly linked list L. The operations ENQUEUE and DEQUEUE should still take O(1) time.
It will take O(1) time to manage the head and tail pointers.
tail -> next = newNode; newNode -> next = NULL; tail = newNode;
output_node = head; head = head -> next; // do whatever with output_node;
Note: You will also have to perform bounds checking and memory allocation / de-allocation before carrying out pointer assignments