Commit | Line | Data |
---|---|---|
1c7a8fe9 JB |
1 | #include <stdio.h> |
2 | ||
3 | #include "clist.h" | |
4 | ||
5 | int main() { | |
6 | link_t* head = list_new(1); | |
7 | printf("Longueur de la liste: %d\n", list_count(head)); | |
8 | list_append(head, 2); | |
9 | list_append(head, 3); | |
10 | list_append(head, 4); | |
11 | printf("Longueur de la liste: %d\n", list_count(head)); | |
12 | printf("Valeur a index %d: %d\n", 2, list_get(head, 2)); | |
13 | printf("Valeur a index %d: %d\n", 3, list_get(head, 3)); | |
14 | printf("Valeur a index %d: %d\n", 4, list_get(head, 4)); | |
15 | list_clear(head); | |
16 | ||
17 | return 0; | |
18 | } |