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...
Files that can be accessed by more than one person can be found in a(n) ________
Fill in the blank(s) with correct word
Computer Science & Information Technology
If a user is accessing a shared folder over the network and it has both shared folder and NTFS permissions applied to it, the ________restrictivepermissionis the effective permission
Fill in the blank(s) with correct word
Computer Science & Information Technology