Dharmendra Gaur
what is cyclomatic complexity ?
By Dharmendra Gaur in .NET on Apr 29 2010
  • Kamal Rawat
    Apr, 2010 29

    Cyclomatic complexity of a piece of code is the number of different paths available in the execution of the program.


    If there is no branching (if-else or switch statement) and looping (while, for & do-while loop), then the statements will execute linearly in the function. Hence cynclomatic complexity = 1;

    A Branching breaks the linear flow of execution in two parts increasing the Cyclomatic complexity of the program. Same goes for the looping statements.

    Hence the more level of indentation we have in our program the more will be the Cyclomatic complexity. 

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS