Intermediate Rust
Q56 / 100

What is the difference between clone() and copy?

Correct! Well done.

Incorrect.

The correct answer is B) Copy is an implicit bitwise copy for simple types; clone() is an explicit deep copy for complex types like String

B

Correct Answer

Copy is an implicit bitwise copy for simple types; clone() is an explicit deep copy for complex types like String

Explanation

Integers implement Copy — assignment copies automatically. String does not implement Copy; you must call .clone() to create a deep copy.

Progress
56/100