Multiple choice technology programming languages

_______ Keyword Enables The Type Of The Variable Declared At Method Scope To Be Determined By The Compiler?

  1. var

  2. type

  3. typeof

  4. null

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The var keyword in C# enables implicitly typed local variables, where the compiler determines the variable's type from the initialization expression. This is not dynamic typing - the type is fixed at compile-time based on what's assigned. The var keyword makes code more readable when the type is obvious from the initialization. Other options like typeof, type, and null don't provide this compiler inference capability.