Delete n nodes after m nodes

https://practice.geeksforgeeks.org/problems/delete-n-nodes-after-m-nodes-of-a-linked-list/1/?ref=self

can you help me with this question ,i am giving link to my solution below

Hi
Where are you facing the problem? Pls elaborate, then we will able to debug

the code isnt compiling and giving error .i just want to know the error and my mistake

Hi
Use
struct node* p=NULL;
struct node* c=head;
struct node* n=c->next;
Now compile errors are gone,solve the segmentation fault. If u face any prob, let me know

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.