Compilation Error
Runtime Error
Answer is Wrong!
Answer is Right!
The correct answer is D.
The statement Dim strCities() As String = {"Bombay", "Chennai", "Ladakh", "Tamil Nadu"} declares a new array of strings called strCities with four elements. The statement strCities(2)="Kolkata" assigns the string “Kolkata” to the third element
{"Bombay", "Chennai", "Kolkata", "Tamil Nadu"}.
Option A is incorrect because there is no
compilation error. Option B is incorrect because there is no runtime error. Option C is incorrect because the third element of the array is “Kolkata”, not “Ladakh”.