A

Admin • 833.24K Points
Coach

Q. Which of the following is a valid function declaration in Rust?

  • (A) function greet() {}
  • (B) fn greet() {}
  • (C) def greet() {}
  • (D) func greet() {}
  • Correct Answer - Option(B)
  • Views: 35
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`fn` is the keyword used to define functions in Rust.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.