iGET

C# Programming - MCQ Practice Questions

C# (.NET) MCQs — OOP, collections, LINQ & exception handling.

290 questions | 100% Free

Q.21Easy

What is the default access modifier for a class member in C# if not explicitly specified?

Q.22Easy

Which statement correctly describes value types in C#?

Q.23Easy

What is the output of: bool result = (5 > 3) && (3 < 2); Console.WriteLine(result);

Q.24Easy

Which of the following is NOT a value type in C#?

Q.25Easy

Which of the following correctly declares and initializes an array in C#?

Q.26Easy

What will be the result of: Console.WriteLine();

Q.27Easy

Which collection type in C# is best suited for key-value pair storage with unique keys?

Q.28Easy

Consider this code: int[] arr = new int[5]; foreach(var item in arr) { Console.Write(item + " "); } What is the output?

Q.29Easy

Which of the following is a correct way to declare a property with auto-implementation in C#?