A

Admin • 833K Points
Coach

Q. The type of a variable that is volatile is

  • (A) Volatile variable
  • (B) Mutable variable
  • (C) Immutable variable
  • (D) Dynamic variable
  • Correct Answer - Option(B)
  • Views: 36
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

A volatile variable refers to a variable whose value can change unexpectedly due to external factors such as hardware changes, multi-threading, or signal handlers. Such variables are typically mutable, meaning they can be modified during program execution.

Other options:

  • (A) Volatile variable → While "volatile" is a keyword in some languages like C and Java, it does not define a variable type; rather, it is a qualifier.
  • (C) Immutable variable → Incorrect, as immutable variables cannot change once assigned.
  • (D) Dynamic variable → This usually refers to variables that are allocated dynamically in memory but does not specifically relate to volatility.

Thus, the correct answer is (B) Mutable variable.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.