C# - Level Beginner 2
1
/20
0
:
0
Submit
Total 20 question (100 marks)
1. The members of the enum are always public, and no access modifiers can be applied.
2. A constructor in a class can have a return type.
3. Which of the following is the correct way to initialize an array?
4. What will be the output of the following code? int i = 5, j; Console.WriteLine(j=i*2);
5. What will be the output of the following program? public static void Main() { int val = GetVal(); } public static
6. Which of the following statement(s) are TRUE?
7. What will be the output of the following code? var greet = "Hello "; var name = "CShap"; Console.WriteLine($"{greet} {name}");
8. What will be the output of the following program? public static void Main(string[] args) { int a = 1,
9. Which of the following statements are TRUE?
10. What will be the output of the following program? public static void Main() { int k; display(k); } static void display(int
11. Which of the following data types can include maximum positive or negative, integer or float value?
12. What will be the output of the following program? class Program { static void Main(string[] args) { double i;
13. Which of the following keyword is used to declare a variable whose type will be automatically determined by
14. Which of the following is the default access modifier in a namespace?
15. Events can also be declared static, virtual, sealed, and abstract.
16. What will be the output of the following program? public static void Main() { int[] arr = {1, 2, 3,
17. What will be the output of the following program? int i = 0; for(;;) { if (i < 5)
18. Which of the following is the built-in delegate function for handling events in .NET?
19. What will be the output of the following code? SortedList sortedList = new SortedList()
20. What will be the output of the following program? static void Main(string[] args) { string str1, str2; str1 = "Cshap";
1.
The members of the enum are always public, and no access modifiers can be applied.
A
True
B
False
Next
Previous
You are need login before take this quiz.
Login