Linked list implemented in c