Circular Linked List

There was some problem at insertion in begin of circular linked list, and 1st element 10 is not printed on console.
Please help me in rectfying the above.

Also, I am not able to implement insertion at middle of circular linked list, and insertion at end of circular linked list.

Please, implement them as well and explain them to me.

Thank you

@ayushmittal628_58414ee9c56e4875
your insert function is ok but print function have a error suppose you are at the last node then your condition for while loop will not be true as its next points to the starting node and you are not printing it
so add a line after the while loop
print temp->data
Coding Blocks IDE
this is the changed code it will work fine and if your issue still exists let me know and if clear mark it as resolved and rate my experience

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.