struct Node *xFromEnd(struct Node *pHead, int x)
{
static int temp = 1;
if (pHead->next != NULL)
xFromEnd(pHead->next, x);
if ((temp++) == x)
return pHead;
}
How do I break out of the function when the condition is met? The return is just going further up on the call stack(going to its previous function call) rather than exiting and going to main. How can I do that?