singly-linked-list

What is wrong with this linked list delete tail node function?

I have written this function to delete the last node of a singly linked list. The problem is, it is able to delete all the nodes except the first/starting node. What is missing from this code snippet? Please answer my particular problem. #include <stdio.h> #include <stdlib.h> struct Node { char CharContent; struct Node *...

Removal of items with duplicate data.

Hi I'm writing a function that removes the consecutive items with duplicate data . e.g For example, passing in the list ->a->b->c->c->a->b->b->b->a->null should result in ->a->b->c->a->b->a->null The list item definition and function declaration are given below struct litem { char data; litem* next; }; Mo code lo...