Implementation of binary tree in c