Question: Part II The following function traverses the binary tree to locate the node with a given key value. struct tree _ node * search (

Part II The following function traverses the binary tree to locate the node with a given key value.
struct tree_node * search(struct tree_node * node,
int value)
i
if (node->key == value)
return node;
else if (node->key > value) i
if (node->left == NULL)
return NULL;
else return search(node->left, value);
}
else
if (node->right == NULL)
return NULL;
else return search(node->right, value);
}
}
Suppose we call search (root,04 e). Fill in the blanks the value of these memory location so that it shows the stack when the execution is at line 5.(More space than needed is provided. ) You can assume that the stack stores only arguments, return address, and the ebp register value. The value of ebp is 0xb ffff 880 when the program calls the function. Write "rtn_addr" for return addresses.
\table[[Address,Value],[0xbffff800,0x4e],[0xbffff7fc,0x804961c],[0xbffff7f8,rtn_addr],[0xbffff7f4,],[0xbffff7f0,],[0xbffff7ec,],[0xbffff7e8,],[0xbffff7e4,],[0xbffff7e0,],[0xbffff7dc,],[0xbffff7d8,],[0xbffff7d4,],[0xbffff7d0,],[0xbffff7cc,],[0xbffff7c8,],[0xbffff7c4,]]
 Part II The following function traverses the binary tree to locate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!