Answer Posted / crispin
/*
* Simple tree node representation
*/
struct node_t {
struct node_t *left;
struct note_t *right;
};
/*
* Return the maximum depth of the tree given a pointer
* to its root node.
*/
unsigned int
tree_depth (node_t *root)
{
return (NULL == root) ? 0 :
MAX(tree_depth(root->left, root->right)+1);
}
Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
Explain what is the most efficient way to store flag values?
Describe dynamic data structure in c programming language?
What is integer constants?
What is a global variable in c?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Can we assign integer value to char in c?
What is n in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What is the advantage of c?
Why can’t constant values be used to define an array’s initial size?
Is that possible to add pointers to each other?
Write a program with dynamically allocation of variable.
difference between object file and executable file
List out few of the applications that make use of Multilinked Structures?