creating a tree using c