Multiple choice technology testing

What can static analysis NOT find?

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

  2. Unreachable (“dead”) code

  3. Whether the value stored in a variable is correct

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

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

Static analysis examines code without executing it, so it can find structural issues like undefined variables, unreachable code, or variable redefinitions. However, it cannot verify semantic correctness - whether the value stored in a variable matches the intended business logic. Static analysis tools don't understand your requirements, so they can't tell if 'x = 5' should have been 'x = 10' - only dynamic testing with known inputs and expected outputs can verify correctness.