Mid point of linked list

getting runtime error when midpoint is find in linked list contaning even number of nodes https://ide.codingblocks.com/

@Faizan-Ali-1395131367301898 Change line 63 to while(fast!=NULL&&fast->next!=NULL)
You strictly need to check in this order.
Do a dry run for even length linked list, you will notice that at one stage when fast pointer is at NULL , fast->next will give an error. So you first need to check fast!=NULL case in the loop. As this will be false at that stage, It will come outside the loop without even checking fast->next!=NULL

Hope this helps :slightly_smiling_face: