A

Admin • 802.91K 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: 7
  • 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.