If you want to use a recursive algorithm, I think you will have to pre-define the entire output area as a grid to allow the left and right sides random access to the output space. Then when the recursion calls are complete, you output the grid.
To be able to 'output as you go' you will need to use a non-recursive algorithm as you need to traverse the tree by depth.
In either case, the width of the output will be determined by the depth of the tree and the output size of the elements in the tree. (One character or more?)
Once you determine the width, the root node is 'centered' on the width.
Then at each lower level, the new 'top' node is 'centered' on its half of the previous width.
With single character outputs, a 1 depth (root only) tree is 1 wide, a 2 depth tree is 5 wide, a 3 depth tree is 11 wide and a 4 depth tree is 23 wide.
So in the output tree, there are 11 spaces in front of the H
Split 23 into 2 halves of 11 each and there are 5 spaces in front of the D. Split 11 into 2 halves of 5 each and there are 2 spaces in front of the B.
Thoughts on a recursive implementation:
A 4 depth tree, needs 23 width and 7 rows.
We could declare a 2 dimensional array: char outbuf[7][24]; but passing those around is a little hard as the 24 part has to be hard-coded.
Alternatively, we could declare a single dimentional array (or allocate it...hmm) and a 'next row' offset.
At each recursion level, we would need to pass the buffer, next row offset, width for this node, offset into the buffer for this node, the node
The node would put its value where indicated.
If the node had a left child, the node would add the '/' character one row down, one column left, calculate the width and offset for the left and recurse.
If the node had a right child, the node would add the '\' character one row down, one column right, calculate the width and offset for the rigth and recurse.
If you like the idea in principle, give it a try and see how you do.