Taking input in circular linked list problem

This is my code for taking input only.

My algo checks whether the data element is already present in the linked list and if so stores the address in a node* pointer. In case the value was repeated it assigns the temp->next (i.e. the “next” of the last element of the current list) to the pointer location stored earlier and then stops taking input.

Please have a look at my code and suggest changes as I’m getting segmentation fault.

@Naman-Bansal-2736674666374052 hey have corrected it,please check:https://ide.codingblocks.com/s/147099

Your code is working good, but can you please have a look at my code and tell me why it’s not working ?
Because as I see it, the code that you have provided me a link to, is not mine. :sweat_smile:

@Naman-Bansal-2736674666374052 hi bro apka input lene ka method wronh hai as you have to use different method as mentioned in code ,please check that and feel free to ask any doubt.

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.