c program on linked list and trees