A

Admin • 833.24K Points
Coach

Q. Which is the correct syntax for an infinite loop in Rust?

  • (A) while(true) {}
  • (B) loop {}
  • (C) for(;;) {}
  • (D) repeat {}
  • Correct Answer - Option(B)
  • Views: 33
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`loop {}` creates an infinite loop in Rust.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.