Learn C# .Net MCQs

Prepare C# .Net MCQs (Multiple choice Questions) for exam and job interviews.

What is the output of Console.WriteLine("A" + "B" + "C");?

1) ABC

2) A B C

3) Error

4) None of the above

Answer : ABC

Which of the following is a built-in data type in C#?

1) decimal

2) object

3) Both a and b

4) None of the above

Answer : Both a and b

What is the output of Console.WriteLine(10 < 5);?

1) true

2) false

3) Error

4) None of the above

Answer : false

Which of the following is NOT a loop structure in C#?

1) for

2) while

3) until

4) foreach

Answer : until

What is the output of Console.WriteLine(1 + 2 * 3);?

1) 7

2) 9

3) 6

4) Error

Answer : 7

Which of the following allows multiple values of different types to be stored in a single object?

1) Array

2) List

3) Dictionary

4) Tuple

Answer : Tuple

What is the output of Console.WriteLine("Hello".ToUpper());?

1) HELLO

2) Hello

3) Error

4) None of the above

Answer : HELLO

Which of the following is used to define an enumerator in C#?

1) enum

2) interface

3) class

4) None of the above

Answer : enum

What is the output of Console.WriteLine(5 == 5 && 3 > 2);?

1) true

2) false

3) Error

4) None of the above

Answer : true

Which of the following is used to implement a delegate in C#?

1) delegate

2) event

3) void

4) None of the above

Answer : delegate