What is wrong with the following function?void _traverse (NODE* root, void (*process) (void* dataPtr)){   if (root)   {       process (root->dataPtr);       _traverse (root->left, process);       _traverse (root->right, process);   } // if   return;}

A. Traversal should be postorder.
B. Traversal should be inorder.
C. Data, left and right should be accessed as root.data, root.left and root.right.
D. Root should be of type NODE, not NODE*.


Answer: B

Computer Science & Information Technology

You might also like to view...

Reusable data abstractions can be built using _________________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A(n) ________ can eliminate the geographical limitations of a LAN

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following is not an advantage of using XML?

A) Better privacy B) Better integration C) Decreased damaged-file recovery D) More compact files

Computer Science & Information Technology

When questions or problems arise, you can use the commands on the ________ menu to find the answers you need.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology