Multiple choice

Which of the following is an invalid declaration of arrays?

  1. Dim arrstu (20) as Integer

  2. Dim arr(k) as Double

  3. Dim arrstu ( 1 To 20) as String

  4. Dim arrstu (2)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Option B uses a variable 'k' inside the array declaration without it being defined or constant, which is invalid in standard VB array declarations.