What values will the following code display? int[] ages = { 12, 15, 26, 31, 18, 20 }; var teens = from item in ages             where item < 20             select item; foreach (var value in teens) {      MessageBox.Show(value); } Question 9 options:   a)  12, 15, 18, 20   b)  26, 31   c)  12, 15, 26, 31, 18, 20   d)  12, 15, 18

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 15E
icon
Related questions
Question

  What values will the following code display?
int[] ages = { 12, 15, 26, 31, 18, 20 };
var teens = from item in ages
            where item < 20
            select item;
foreach (var value in teens)
{
     MessageBox.Show(value);
}

Question 9 options:

 

a) 

12, 15, 18, 20

 

b) 

26, 31

 

c) 

12, 15, 26, 31, 18, 20

 

d) 

12, 15, 18

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage