In the ArrayBag class, what function does the __str__ method use to generate a sequence of strings from a bag?
A. count
B. len
C. add
D. map
Answer: D
You might also like to view...
Which of the following would be an appropriate loop header when reading data from a file to fill an array defined by:
float grades[MAX]; a) for (int i = 0; i < MAX; i++) b) for (int i = 0; i < MAX –1; i++) c) while (!fileIn.eof( )) d) while (!fileIn.eof( ) && i < MAX)
Match the following terms to their meanings:
I. Double-click II. Hourglass III. Echo Macro IV. Show All Actions V. Autoexec A. A macro that executes each time the database is opened B. Action performed on a macro makes it execute C. Mouse pointer changes to this to inform the user that an action is taking place D. Shows the default list of trusted macro actions E. Hides or displays the results of the macro while it runs
You can use a 3-D reference with 24 different functions.
Answer the following statement true (T) or false (F)
What heap operation does the following function implement?bool heapOperation (HEAP* heap, void** dataOutPtr){ if (heap->size == 0) return false; *dataOutPtr = heap->heapAry[0]; heap->heapAry[0] = heap->heapAry[heap->last]; (heap->last)--; (heap->size)--; _reheapDown (heap, 0); return true;}
A. create heap B. insert heap C. destroy heap D. delete heap