A

Admin • 833.24K Points
Coach

Q. What does the `clone()` method do in Rust?

  • (A) Creates a shallow copy
  • (B) Creates a deep copy
  • (C) Moves ownership
  • (D) Deletes data
  • Correct Answer - Option(B)
  • Views: 28
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`clone()` creates a deep copy of the value or data.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.