A

Admin • 833.24K Points
Coach

Q. What is the output of `Some(5).unwrap_or(10)`?

  • (A) 10
  • (B) Some(5)
  • (C) None
  • (D) 5
  • Correct Answer - Option(D)
  • Views: 24
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`unwrap_or` returns the inner value if present, otherwise the fallback.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.