What is wrong with the following function?void* _retrieve (BST_TREE* tree,void* dataPtr, NODE* root){   if (tree->compare(dataPtr, root->dataPtr) < 0)      return _retrieve(tree, dataPtr, root->left);   else if (tree->compare(dataPtr,root->dataPtr) > 0)      return _retrieve(tree, dataPtr, root->right);   else      return root->dataPtr;   }}

A. The return type should be void, not void*.
B. Its name should be BST_Retrieve.
C. A call to _retrieve(tree,dataPtr,root) is needed.
D. The case when the data is not in the tree is missing.


Answer: D

Computer Science & Information Technology

You might also like to view...

A network administrator wants to verify the network connection at 10.10.20.5. Which of the following commands can be used to verify the connection? (Select all that apply.)

a. ping all 10.10.20.5 b. ping 10.10.20.5 c. ping -t 10.10.20.5 d. ping -2 10.10.20.5

Computer Science & Information Technology

Briefly explain how to protect an organization's hardware.

What will be an ideal response?

Computer Science & Information Technology

?Internet Explorer supports grid styles using the _____ browser prefix.

A. ?-ms- B. ?-fr- C. ?-ie- D. ?-wbr-

Computer Science & Information Technology

Buttons are identified in an interface by their _________.

A. name B. title  C. caption D. ID

Computer Science & Information Technology