diff options
| -rw-r--r-- | .DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | linked_list_test.c | 29 |
3 files changed, 30 insertions, 0 deletions
diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf --- /dev/null +++ b/.DS_Store | |||
| Binary files differ | |||
| @@ -2,4 +2,5 @@ a.out | |||
| 2 | linked_list_test* | 2 | linked_list_test* |
| 3 | *.a | 3 | *.a |
| 4 | *.o | 4 | *.o |
| 5 | !*.c | ||
| 5 | 6 | ||
diff --git a/linked_list_test.c b/linked_list_test.c new file mode 100644 index 0000000..a71a1ff --- /dev/null +++ b/linked_list_test.c | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include <stdlib.h> | ||
| 3 | #include "linked_list.h" | ||
| 4 | |||
| 5 | int main(){ | ||
| 6 | |||
| 7 | node* ll = malloc(sizeof(node)); | ||
| 8 | ll->value = 1; | ||
| 9 | ll->next = NULL; | ||
| 10 | |||
| 11 | |||
| 12 | print_ll(ll); | ||
| 13 | reverse_ll(&ll); | ||
| 14 | print_ll(ll); | ||
| 15 | /* delete_node(&ll, 0); */ | ||
| 16 | |||
| 17 | /* print_ll(ll); */ | ||
| 18 | /* printf("The length of ll is %d\n", count_ll(ll)); */ | ||
| 19 | |||
| 20 | /* delete_node(&ll, 0); */ | ||
| 21 | /* print_ll(ll); */ | ||
| 22 | /* printf("The length of ll is %d\n", count_ll(ll)); */ | ||
| 23 | /* printf("%d\n", search_node(ll, 10)->value); */ | ||
| 24 | |||
| 25 | /* printf("%d\n", get_value(ll, 3)); */ | ||
| 26 | |||
| 27 | /* free_ll(ll); */ | ||
| 28 | return 0; | ||
| 29 | } | ||
