← Quiz: Memory and Smart Pointers: all 10 questions
Quiz: Memory and Smart Pointers · Question 1 of 10
Which smart pointer should be your default choice?
Which smart pointer should be your default choice?
- A.unique_ptr
- B.shared_ptr
- C.weak_ptr
- D.auto_ptr
Answer & explanation
Correct answer: unique_ptr
unique_ptr has no reference-counting overhead and clear single ownership.
Can you get the rest right without peeking?
Take the timed Quiz: Memory and Smart Pointers quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →