- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
How will you count the odd numbers from the array shown below using LINQ in .Net framework 4.0?

int[]numbers={5,4,1,3,9,8,6,7,2,0};

1.int findoddNumbers = numbers.Count(n => n % 2 == 1);

2.int findoddNumbers = numbers.Count( n % 2 == 1);<br><br>

3.int findoddNumbers = (from number in numbers<br>where numbers%2==1<br>select Count());<br><br>

4.https://quizack.com/net/mcq/how-will-you-count-the-odd-numbers-from-the-array-shown-below-using-linq-in-net-framework-4-0-int-numbers-5-4-1-3-9-8-6-7-2-0#:~:text=int%20findoddNumbers%20%3D%20(from%20n

Posted Date:-2022-08-16 04:35:14


More MCQS Questions and answers

Search