Which statement about class unique_ptr (of the new C++ standard) and dynamic memory allocation is false?
A) An object of class unique_ptr maintains a pointer to dynamically allocated memory.
B) When a unique_ptr object destructor is called (for example, when a unique_ptr object goes out of scope) , it performs a destroy operation on its pointer data member.
C) Class template unique_ptr provides overloaded operators * and -> so that a unique_ptr object can be used just as a regular pointer variable is.
D) Class unique_ptr is part of the new C++ standard and it replaces the deprecated auto_ptr class.
Correct Answer:
Verified
Q1: If dynamic memory has been allocated for
Q2: An exception:
A) Terminates program execution.
B) Terminates the
Q3: Exception handling should not be used:
A) As
Q4: To rethrow an exception, the exception handler
Q5: Which class indicates that an error occurred
Q7: The purpose of stack unwinding is to:
A)
Q8: Select the false statement regarding exceptions.
A) The
Q9: The try block cannot:
A) Enclose the code
Q10: Once an exception is thrown, when can
Q11: Select the false statement. A rethrown exception:
A)
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