Explore topic-wise MCQs in ASPDotNET (MCQ) questions and answers.

This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your ASPDotNET (MCQ) questions and answers knowledge and support exam preparation. Choose a topic below to get started.

1.

Choose the correct one.int[] numbers = { 9, 10, 0, 11 }; var nums = from n in numbers select n + 1; foreach (var i in nums) { Console. Write (i+ , ); }

A. 10, 11, 1, 12
B. 10, 11, 12, 13
C. 9, 10, 0, 11
D. None of these
Answer» B. 10, 11, 12, 13
2.

Choose the correct one. int[] numbers = { 9, 4, 1, 3, 8, 6, 7, 2,1 }; var nums = numbers.Take(3);foreach (var n in nums){ Console.WriteLine(n); }

A. 7 2 1
B. 9 4 1
C. 3 8 6
D. 14 9
Answer» C. 3 8 6
3.

Choose the correct one.int[] numbers = { 5, 4, 11, 3, 9, 8, 6, 7, 2, 0 };var nums = numbers.Skip(4);foreach (var n in nums){Console.Write(n+ );}

A. 9867 2 0
B. 5411398
C. 54113
D. None of the above
Answer» B. 5411398
4.

Choose the correct one.int[] A = { 0, 2, 4, 5, 6, 8 }; int[] B = { 1, 3, 5, 7, 8 }; var nums = A.Union(B);foreach (var n in nums) { Console.Write(n+ ); }

A. 0 24568 13578
B. 0 2 4 5 6 8 1 3 7
C. 0 1 2 3 4 5 6 7 8
D. None of the above
Answer» C. 0 1 2 3 4 5 6 7 8
5.

Choose the correct one.int[] A = { 0, 2, 4, 5, 6, 8, 9 }; int[] B = { 1, 3, 5, 7, 8 }; IEnumerable

A. 0, 2, 4, 5, 6, 8, 9
B. 1, 3, 5, 7, 8
C. 0 2 4 6 9
D. All of the above
Answer» D. All of the above
6.

What LINQ expressions are used to shape results in a query?1. where2. select3. join4. group

A. 2, 4
B. 1, 2
C. 3, 4
D. None
Answer» B. 1, 2
7.

What types of shapes can LINQ query results be shaped into? 1. Collections of primitive types2. Collections of complex types3. Single types4. Collections of anonymous types

A. 1, 2, 4
B. 1,2,3
C. 1,3,4
D. None of the above
Answer» B. 1,2,3
8.

What is lamda expression?1. Anonymous function2. Canbe used to create delegates3. Named function4. None

A. 1, 2
B. 1, 2, 3
C. 1, 3
D. 4
Answer» B. 1, 2, 3