insertion on nth position of linklist

0as0P7 - Online IDE & Debugging Tool - Ideone.com this is my code of insertion @ nth position in a link list but it is behaving strangely its working like insertion in the begining of link list i don,t no why

You are supposed to use < instead of <= in line no. 26 of your code.

I tried it.

Now it works perfectly! :slight_smile:

I’ve changed a few lines of your code and implemented in C. It should work now.

Hope it helps and you find where you were going wrong :slight_smile:

2 Likes

@prrateekk it is not working properly i want to give two inputs but its asking for one and its behavivour is just like insertion in the begining of link list