MCQs > IT & Programming > .NET > 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};

.NET MCQs

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


Answer

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

Explanation:

Note: This Question is unanswered, help us to find answer for this one

.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it