[Solved] Singly Linked List – Backward in C [closed]


after you will build the fundamental function for this list
you can use “for each” function to do your task:

int SlistForeach(node_t from, node_t to , action_func_t 
action_func, void *param)
{
    int stat = 1;
    node_t index = from;
    assert(NULL != to);
    assert(NULL != from);

    while(index != to)
    {
        stat = action_func(&(index->data), param);
        if(0 == stat)
        {
            return (stat);
        }
        index = index->next;
    }

    return(stat);
}

2

solved Singly Linked List – Backward in C [closed]