A

Admin • 802.91K Points
Coach

Q. What is the main difference between `Box<T>` and `Rc<T>`?

  • (A) `Box` allows multiple ownership, `Rc` doesn't
  • (B) `Box` is for shared ownership, `Rc` is for unique ownership
  • (C) `Box` is for unique ownership, `Rc` is for shared ownership
  • (D) They are identical
  • Correct Answer - Option(C)
  • Views: 7
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`Box` provides unique ownership, while `Rc` provides shared ownership.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.