Q1)
sir, why am i getting segment fault in my code in this site , it is working fine in my vs code .
Code -> https://sapphireengine.com/@/r2ityi
Q2)
And how the below loop is giving the last element of circular list .
(temp->next!=head)
as when temp is in last element then next is pointing to head , so it should get out of the loop,