31. What is the correct syntax to declare a constant in C#? A. int MAX_VALUE = 100; B. const int MAX_VALUE = 100; C. const MAX_VALUE = 100; D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
32. Which of the following is NOT a valid data type in C#? A. bool B. decimal C. long double D. char Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
33. What is the scope of a global variable in C#? A. Limited to the block in which it is declared B. Limited to the method in which it is declared C. Limited to the class in which it is declared D. Throughout the entire program Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
34. In C#, which data type is used to represent characters and symbols? A. double B. int C. char D. string Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
35. 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 & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
36. Which of the following is a valid constant in C#? A. const float PI = 3.14; B. readonly float PI = 3.14; C. float const PI = 3.14; D. const PI = 3.14; Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
37. What is the correct way to declare and initialize a constant in C#? A. int const VALUE = 10; B. const VALUE = 10; C. VALUE = const 10; D. const int VALUE = 10; Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
38. Which of the following is a valid variable name in C#? A. 123variable B. _variable C. myVariable D. Variable! Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
39. What is the data type of the following variable declaration: var name = "John"; A. object B. string C. int D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
40. In C#, which keyword is used to declare a variable that cannot be modified once it is assigned a value? A. readonly B. static C. const D. volatile Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board