i want to know the program how to insert at the beginning of a circular linked list in C.
>i want to know the program how to insert at the beginning of a circular linked list in C.
Guess what? There is no beginning to a circular linked list. That's why it's called a circular linked list: because it is.
You can refer this article for all operations on circular linked list...
this was migrated to http://www.cpp-programming.net/c-tidbits/circular-linked-lists/ just mentioning again for benefit of others
if u r askin for a code to insert a node before head node then
first create a temporary node, traverse the list using a condition "while(next->link!=head)", then assign the address of temporary node to next->link then shift next to this temporary node and at last assign the address of head to link part of this node, shift head at temporary node.