The third parameter is the level of the node in the tree, with the root node being level zero. Parameters Key Points to the data to be located. ComparisonPointer Points to the comparison function, which is called with two parameters that point to the elements being compared. RootPointer Points to a variable that in turn points to the root of the tree. Action Names a routine to be invoked at each node.
Root Points to the roots of a binary search node.
If the first parameter is less than the second parameter, the ComparisonPointer parameter returns a value less than 0. If the first parameter is equal to the second parameter, the ComparisonPointer parameter returns a value of 0. If the first parameter is greater than the second parameter, the ComparisonPointer parameter returns a value greater than 0. The comparison function need not compare every byte, so arbitrary data can be contained in the elements in addition to the values being compared. If the node is found, the tsearch and tfind subroutines return a pointer to it.