pi_coder/examples/c-linkedlist/main.c

16 lines
330 B
C
Raw Permalink Normal View History

#include <stdio.h>
#include "linked_list.h"
int main(void) {
Node *list = NULL;
for (int i = 1; i <= 5; i++)
list = list_append(list, i);
printf("Liste: ");
list_print(list);
printf("Länge: %d\n", list_length(list));
list_free(list); /* leckt wegen unvollständigem TODO */
return 0;
}