Linked list even after odd

problem link:
https://hack.codingblocks.com/contests/c/511/315

why isn’t my segregateoddeven function working,
code link:
https://ide.codingblocks.com/#/s/25483

https://ide.codingblocks.com/#/s/25717

I have made some changes in your code to point out your mistake.
The code is not fully correct. It will work only when the entered list starts with an odd number.
Think over it and give it a try again.