1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include "list.h"
void main() {
struct _list *head = NULL;
int data[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, -999};
for (int i = 0; data[i] != -999; i++)
insert_val(&head, data[i], -1);
show_list(head);
printf("\n");
delete_list_at(&head, 6);
insert_val(&head, 25, 2);
show_list(head);
printf("\n");
free_list(head);
}