Multiple choice technology storage

What can static analysis NOT find?

  1. a) The use of a variable before it has been defined

  2. b) Unreachable (“dead”) code

  3. c) Whether the value stored in a variable is correct

  4. d) The re-definition of a variable before it has been used

  5. e) Array bound violations

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

Static analysis can detect structural issues like undefined variables (a), unreachable code (b), variable redefinitions (d), and array bounds violations (e) by analyzing code without execution. However, it cannot determine if a stored value is logically correct for the intended computation (c); that requires understanding requirements and dynamic testing.