The maximum depth or height of a binary is the number of nodes from root node to its farthest or deepest leaf node. For example the below binary tree has height or depth is 3.

C program to calculate maximum depth or height of a binary tree

Recursive solution