X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TP_9%2Fexo2%2Fexo2.c;h=3b62ea4620b90f7ffa7dffa6307d15163391a350;hb=3de00528618f48f669d1b2ff673fd1370cdf5323;hp=15172cee30296de07f8e18242bd7c0bfd30c20f4;hpb=f8051b356ef079c703c1dc0369a135b5032f4027;p=TD_C.git diff --git a/TP_9/exo2/exo2.c b/TP_9/exo2/exo2.c index 15172ce..3b62ea4 100644 --- a/TP_9/exo2/exo2.c +++ b/TP_9/exo2/exo2.c @@ -20,6 +20,18 @@ int main() { printf("Valeur a index %d: %d\n", 4, list_get(head, 4)); list_set(head, 0, 78); printf("Valeur a index %d: %d\n", 0, list_get(head, 0)); + printf("Valeur a index %d: %d\n", 1, list_get(head, 1)); + printf("Valeur a index %d: %d\n", 2, list_get(head, 2)); + head = list_insert(head, 2, 7); + printf("Valeur a index %d: %d\n", 1, list_get(head, 1)); + printf("Valeur a index %d: %d\n", 2, list_get(head, 2)); + printf("Valeur a index %d: %d\n", 3, list_get(head, 3)); + head = list_delete(head, 3); + printf("Valeur a index %d: %d\n", 0, list_get(head, 0)); + printf("Valeur a index %d: %d\n", 1, list_get(head, 1)); + printf("Valeur a index %d: %d\n", 2, list_get(head, 2)); + printf("Valeur a index %d: %d\n", 3, list_get(head, 3)); + printf("Valeur a index %d: %d\n", 4, list_get(head, 4)); list_clear(head); return 0;