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};

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


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!