S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What does the .len() method return for a string or vector?

  • (A) Number of bytes
  • (B) Number of elements
  • (C) Memory address
  • (D) Last element
  • Correct Answer - Option(B)
  • Views: 5
  • Filed under category Rust
  • Hashtags:

Explanation by: Shyam Dubey
.len() returns the number of elements in a collection.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.