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

A. It is missing one recursive call to _retrieve.
B. The first if should be "if (tree->compare(keyPtr, root->dataPtr) < 0)".
C. The second if should be "if (tree->compare(keyPtr, root->dataPtr) >= 0)".
D. It does not check if the data is not in the tree.


Answer: D

Computer Science & Information Technology

You might also like to view...

A key characteristic of a(n) ____ is the ability to lurk in a computer for days or months, quietly copying itself.

A. worm B. bug C. virus D. Trojan horse

Computer Science & Information Technology

An area that allows for the addition of new forms, reports, or other database objects is the ________

A) application B) subform control C) navigation control bar D) navigation form

Computer Science & Information Technology

Used to create a new table from the results of a query

a. Query wizard b. Table query c. Make table query

Computer Science & Information Technology

Recently, Frank’s computer has slowed down dramatically. He has also noticed that the time on the computer is not accurate. Frank has run several antivirus scans, but has not found an issue. Today while surfing the web, he was redirected several times to a website that he did not request. Then a BSOD error occurred on his computer, and when he turned on his computer, the antivirus software was disabled.   What kind of malware could be causing the issues on Frank’s computer?

A. Zombie B. Rootkit C. Spyware D. Ransomware

Computer Science & Information Technology