Write a C function to compute the balance factor of a binary tree. If it is called initially with the root pointer, it should determine the balance factor of the entire tree. If it is called with a pointer to a sub tree, it should determine the balance factor for the sub tree.