What years are displayed in the list box by the following program segment?

```
Dim years() As Integer = {1492, 1776, 1840, 1929, 1945, 2005}
Dim query = From year in years
Where Is20thCentury(year)
Select year
For Each yr in query
lstBox.Items.Add(yr)
Next
Function Is20thCentury(num As Integer) As Boolean
If (num >= 1900) and (num < 2000) Then
Return True
Else
Return False
End IF
End Function
```
(A) 1929 and 1945
(B) 1929
(C) 1492, 1776, 1840, 1929, 1945, 2005
(D) No years

(A) 1929 and 1945

Computer Science & Information Technology

You might also like to view...

How should your Group Policy settings be managed for Windows Update when multiple versions of Windows operating systems are being utilized?

What will be an ideal response?

Computer Science & Information Technology

A function can be called multiple times within a block of code.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology