What is the purpose of the 'volatile' keyword in C#?
A. To define a constant
B. To make a variable accessible outside its class
C. To make a variable read-only
D. To indicate that a variable's value can be modified by multiple threads concurrently
Answer: Option D
Related Questions on Variables and Constants in C Sharp
What is the correct syntax to declare a variable in C#?
A. variable int num;
B. num = int;
C. int = num;
D. int num;
Which of the following is NOT a valid variable name in C#?
A. 1variable
B. _variable
C. variable1
D. Variable

Join The Discussion