Singly Linklist
Singly Linklist
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
};
newNode->data = data;
newNode->next = *head;
*head = newNode;
if (*head == NULL) {
return;
*head = (*head)->next;
printf("Deleted: %d\n", temp->data);
free(temp);
node = node->next;
printf("\n");
int main() {
insertStart(&head, 10);
insertStart(&head, 20);
insertStart(&head, 30);
display(head);
deleteStart(&head);
display(head);
return 0;