• + 1 comment

    Why is this code not working? What is missing? Anyone could let me know?

    int GetNode(struct Node, int positionFromTail) { static int position = 0; int ret = 0;

        if (head) {
                ret = GetNode(head->next, positionFromTail);    
                if (position++ == positionFromTail)
                        return head->data;
        }    
        return ret;
    

    }