A

Admin • 802.91K Points
Coach

Q. Which of the following is the correct way to declare a mutable variable in Rust?

  • (A) let mut x = 5;
  • (B) mut x = 5;
  • (C) var x = 5;
  • (D) x := 5;
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`let mut x = 5;` allows the variable `x` to be mutable in Rust.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.