What is wrong with the following compare function to used by the ADT?bool compareStu (void* stu1, void* stu2){   STUDENT s1;   STUDENT s2;   s1 = *(STUDENT*)stu1;   s2 = *(STUDENT*)stu2;   if ( s1.id != s2.id)      return false;   return true;}

A. It should return low (-1), equal (0), or high (+1).
B. s1 and s2 should be defined as STUDENT *s1 and STUDENT *s2.
C. The assignment of s1 should be written as "s1 = *(STUDENT)stu1"; the same for s2.
D. The id field should be referenced as "s1->id" and "s2->id".


Answer: A

Computer Science & Information Technology

You might also like to view...

Which of these translates printed lettering into pure text that can be searched and manipulated on a computer?

a. Picture archiving and communication system b. Portable document format c. Optical character recognition d. None of the above

Computer Science & Information Technology

Unlike other images, there is no need to consider file size when you add a background image.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

As you move the pointer over font names in the font list, the text on the slide displays a ____ of the different font choices.

A. Thumbnail B. Live Thumbnail C. Preview D. Live Preview

Computer Science & Information Technology

Which type of tool can be used to compare results and verify a new tool by viewing data in its raw format?

a. A disk imager b. A write-blocker c. A bit-stream copier d. A disk editor

Computer Science & Information Technology