Learn C# .Net MCQs
Prepare C# .Net MCQs (Multiple choice Questions) for exam and job interviews.
Which of the following keywords is used to declare an abstract class in C#?
1) abstract
2) virtual
3) static
4) none of the above
Answer : abstract
What is the output of Console.WriteLine(100 / 3);?
1) 33
2) 33.33
3) 34
4) Error
Answer : 33
Which of the following is true about the "using" statement in C#?
1) It is used for exception handling.
2) It is used to include namespaces.
3) It is used for resource management.
4) Both b and c
Answer : Both b and c
What is the output of Console.WriteLine(10 > 5 && 5 < 10);?
1) true
2) false
3) Error
4) None of the above
Answer : true
Which of the following is used to declare a method in C#?
1) void MethodName() {}
2) MethodName() {}
3) public MethodName() {}
4) None of the above
Answer : void MethodName() {}
What is the output of Console.WriteLine("Hello".ToLower());?
1) hello
2) Hello
3) HELLO
4) Error
Answer : hello
What is the output of Console.WriteLine(2 == 2 ? "True" : "False");?
1) True
2) False
3) Error
4) None of the above
Answer : True
Which of the following is used to concatenate strings in C#?
1) +
2) &
3) |
4) None of the above
Answer : +
What is the output of Console.WriteLine("1234".Length);?
1) 4
2) 5
3) Error
4) None of the above
Answer : 4
Which of the following statements is used to catch exceptions in C#?
1) catch
2) try
3) finally
4) None of the above
Answer : catch