1. Which keyword is used to declare a constant in C#? A. static B. const C. volatile 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
2. What is the default value of an integer variable in C# if not initialized explicitly? A. null B. -1 C. 0 D. 1 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
3. What is the correct syntax to declare a variable in C#? A. variable int num; B. num = int; C. int = num; D. int num; 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
4. Which of the following is NOT a valid variable name in C#? A. 1variable B. _variable C. variable1 D. Variable 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
5. What is the scope of a local variable in C#? A. Limited to the file in which it is declared B. Limited to the class in which it is declared C. Limited to the method in which it is declared D. Limited to the block in which it is declared 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
6. Which data type is used to store whole numbers in C#? A. float B. double C. int 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
7. What is the purpose of the 'readonly' keyword in C#? A. To make a variable constant B. To make a variable accessible outside its class C. To make a variable read-only D. To make a variable static 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
8. What is the correct way to declare a string variable in C#? A. var str; B. string str; C. string = str; 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
9. In C#, which keyword is used to declare a variable that can hold values of any data type? A. var B. dynamic C. any D. object 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
10. What is the purpose of a variable in C#? A. To handle exceptions B. To define a method C. To store and manipulate data D. To define a constant 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