• Software Testing Dictionary
  • Home

Unreachable Code


What is unreachable code?

Unreachable code, a part of the source code that will never be executed due to inappropriate exit points/control flow. The other kind of unreachable code is referred as dead code, although dead code might get executed but has no effect on the functionality of the system.


Below example clearly shows unreachable code and dead code differences:

Unreachable Code in Test Life Cycle

Unreachable Code Side Effects:

  • Unnecessary memory overheads.

  • Unnecessary caching cycles which leads to performance bottlenecks.

  • Documenting and Maintaining overheads.

Unreachable Code Causes:

  • Programming errors while developing complex conditional branches.

  • Incomplete unit testing because of which unreachable code was undetected.

  • Redundant code that developer forgot to delete

  • The code that might be programmatically correct but won't be executed at any point of time due to the input data that is passed to the function.

Useful Video Courses


Software Engineering Basics

80 Lectures 7.5 hours

Arnab Chakraborty


The Perfect Open Broadcaster Software Recording Studio

10 Lectures 1 hours

Zach Miller


SEO Keyword Research Made Easy + FREE Research Software

17 Lectures 1.5 hours

Zach Miller


How To Startup Your Own SaaS (Software As a Service) Company

60 Lectures 5 hours

John Shea


Software development in Python: A practical approach

99 Lectures 10 hours

Daniel IT


Software Development Processes (SDLC Models)

62 Lectures 5 hours