A

Admin • 828.03K Points
Coach

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

  • (A) Consumes the vector
  • (B) Returns an iterator by value
  • (C) Returns an iterator by reference
  • (D) Sorts the collection
  • Correct Answer - Option(C)
  • Views: 8
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`.iter()` returns an iterator that borrows the collection.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.