-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8-main.c
68 lines (66 loc) · 1.95 KB
/
8-main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "lists.h"
/**
* main - check the code
*
* Return: Always EXIT_SUCCESS.
*/
int main(void)
{
dlistint_t *head;
head = NULL;
add_dnodeint_end(&head, 0);
add_dnodeint_end(&head, 1);
add_dnodeint_end(&head, 2);
add_dnodeint_end(&head, 3);
add_dnodeint_end(&head, 4);
add_dnodeint_end(&head, 98);
add_dnodeint_end(&head, 402);
add_dnodeint_end(&head, 1024);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 5);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
printf("-----------------\n");
delete_dnodeint_at_index(&head, 0);
print_dlistint(head);
return (0);
}