In the linked list implementation of the queue, we had both a destructor and a makeEmpty function because:
A. the destructor needs to call the makeEmpty function
B. the client may want to empty out the queue without destroying it; however, the client shouldn’t have to remember to use makeEmpty to avoid memory leak upon destruction of the queue
C. the makeEmpty function needs to call the destructor; otherwise, the queue cannot be destroyed
D. only one is used to free dynamic memory, the other cannot
B
You might also like to view...
To initiate the process of creating a new tab, you click Customize Ribbon in the PowerPoint Options dialog box
Indicate whether the statement is true or false
Keyboards that are widely used on various smartphones and other small portable devices, and which are designed primarily for communicating via texting and connecting to the web.
A. thumb B. combination C. notebook D. traditional
All of the data stored and transmitted by digital devices is encoded as bits.
Answer the following statement true (T) or false (F)
Write a C++ program that prompts the user to input three integer values and find the greatest value of the three values.
Example: Enter 3 integer vales separated by space: 10 15 20 The greatest value is: 20