Which of the following statements about a unique_ptr object is true?
A) A unique_ptr is a "smart pointer" for managing dynamically allocated memory.
B) When a unique_ptr goes out of scope, its destructor automatically returns the managed memory to the free store.
C) You must explicitly delete the memory that's managed by a unique_ptr before the object goes out of scope.
D) All of the above.
Correct Answer:
Verified
Q14: Suppose you have a programmer-defined data type
Q15: The conventional way to distinguish between the
Q16: Which situation would require the operator to
Q17: Which statement about operator overloading is false?
A)
Q18: Because the postfix increment operator returns objects
Q20: The correct function name for overloading the
Q21: Which of the following lines would be
Q22: The array subscript operator [], when overloaded,
Q23: Which of the following is false?
A) An
Q24: A copy constructor:
A) Is a constructor with
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents