C# in Random level
/20
0
:
0
Submit
Total 20 question (100 marks)
1. How do you insert COMMENTS in C# code?
2. What will be the output of the following code? SortedList sortedList = new SortedList()
3. Which of the following statements is true?
4. Which of the following data types can include maximum positive or negative, integer or float value?
5. How do you create a variable with the number value 10?
6. Which of the following is the default access modifier in a namespace?
7. What will be the output of the following program? public static void Main() { int k; display(k); } static void display(int
8. What will be the output of the following program? class Program { static void Main(string[] args) { double i;
9. What will be the output of the following program? static void Main(string[] args) { string str1, str2; str1 = "Cshap";
10. Which common design pattern is shown below? public class A { private A instance; private
11. What is the top .NET class that everything is derived from?
12. Which of the following is NOT allowed in C# as an access modifier?
13. Which of these statements correctly declares a two-dimensional integer array in C#?
14. Correct Declaration of Values to variables a and b ?
15. Which of the following is the correct way to initialize an array?
16. LINQ stands for ________.
17. If a method is marked as protected internal, who can access it?
18. How do you start writing an if statement in C#?
19. What will be the output of the following code? var greet = "Hello "; var name = "CShap"; Console.WriteLine($"{greet} {name}");
20. Which of the following converts a type to a single Unicode character, where possible in C#?
Next
Previous