A

Admin • 828.03K Points
Coach

Q. What is the result of `let a = &5;` in Rust?

  • (A) Move the value 5
  • (B) Create a reference to 5
  • (C) Create a mutable reference
  • (D) Create a raw pointer
  • Correct Answer - Option(B)
  • Views: 5
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`&5` creates an immutable reference to the integer 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.