basic link list operations in c