What will be the output of the below program?

Class Program
Shared Sub Main(ByVal args() As String)
Dim nums() As Integer = {1, -2, 3, 0, -4, 5}

var posNums = from n in nums
where n >= 0
Dim n As select
Dim i As Integer
For Each i In posNums
Console.Write(i + " ")
Next
Console.WriteLine()
Console.ReadLine()
End Sub
End Class

 Posted by Rajnilari2015 on 3/23/2016 | Category: VB.NET Interview questions | Views: 2960 | Points: 40
Select from following answers:
  1. 0, 1, -2, -4, 5
  2. 1, 3, 0, 5
  3. 1, 3, 5
  4. Run time error
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response