Multiple choice technology testing

Figure out the issue in the piece of code below Dim arr(5) s = 10 Redim arr(s)

  1. Code above is perfectly valid

  2. Redim size is invalid

  3. Cannot redim a static array

  4. None

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

The array is declared with a fixed size using Dim arr(5), creating a static array. The ReDim statement can only be used on dynamic arrays (declared without parentheses), so attempting to ReDim a static array causes an error.