What is the value of len in the following Visual Basic code? Dim strCities() As String = {“Bombay”, “Chennai”, “Ladakh”, “Tamil Nadu”} Dim len As Integer len = strCities.Length()

4
0
3
5

The correct answer is A. 4.

The Length property of a string array returns the number of elements in the array. In this case, the array contains four elements, so the value of len will be 4.

Option B is incorrect because the array is not empty.

Option C is incorrect because the array contains four elements, not three.

Option D is incorrect because the array is not a string, it is a string array.

Exit mobile version