What is cyclomatic complexity and why is it important?

Answer Posted / sheetal

What is cyclomatic complexity
Cyclomatic complexity is a computer science metric
(measurement) developed by Thomas McCabe used to generally
measure the complexity of a program. It directly measures
the number of linearly independent paths through a programs
source code.
The concept, although not the method, is somewhat similar to
that of general text complexity measured by the
Flesch-Kincaid Readability Test.
Cyclomatic complexity is computed using a graph that
describes the control flow of the program. The nodes of the
graph correspond to the commands of a program. A directed
edge connects two nodes, if the second command might be
executed immediately after the first
command. By definition,
CC = E - N + P
where
CC = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is aspect-oriented programming?

541


Describe session handling in a webfarm?

555


What is asp net objects?

521


Explain about solution explorer window?

615


Is asp.net different from asp? If yes, explain how?

494






How do I send an email message from my ASP.NET page?

529


How Can assign alias name for ASP.NET Web API Action?

934


What is query string? What are its advantages and limitations?

512


What is the difference between union and join?

563


Is asp.net core faster?

540


What is the difference between page.registerclientscriptblock and page.registerstartupscript?

480


What is the main difference between Asp.net and Vb.net?

566


What are url fragments?

500


What are the asp.net security controls?

548


What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?

506