Question 3
Back to Exercise
After auto q = std::move(p); with unique_ptrs, what is p?
- A Still owns the object
- B Empty (nullptr) Correct
- C Dangling
- D A copy of q
Correct Answer: Option B
unique_ptr guarantees the moved-from pointer is null.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!