This is a practice for avl tree in data structure! I don't guarantee its bug free.
You can use it with gcc compiler: gcc -o 1 tree.c! If you have any question about how to use it, please see the main function in tree.c file. The data in leaf's structure is pointed by a void pointer, so you can put any kind of data in the leaf throught the correspondent pointer.