S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What does the static keyword mean when used with a variable?

  • (A) Stored on the stack
  • (B) Thread-local value
  • (C) Value lives for the entire duration of the program
  • (D) Value can’t be mutated
  • Correct Answer - Option(C)
  • Views: 7
  • Filed under category Rust
  • Hashtags:

Explanation by: Shyam Dubey
static variables have a 'static lifetime, meaning they exist for the program’s lifetime.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.