What is cyclomatic complexity and why is it important?



What is cyclomatic complexity and why is it important?..

Answer / 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

More ASP.NET Interview Questions

WHAT IS polymorphism

2 Answers   Fidelity,


what is state management,what is the purpose of it,how it will be implemented in real time?

2 Answers  


ADO.Net - how to get data from database and bind to the controls -- write this small code

3 Answers   Syntel,


Usage of web.config?

2 Answers   Microsoft,


What is CLR ? Differentiate between CLR & CTS.

7 Answers   3i Infotech, TCS,






Explain how cookies work. Give an example of cookie abuse.

0 Answers  


What is the size of Get method and how much data it can store?

0 Answers   HCL,


What is the difference between a Stored procedure and function?

9 Answers  


What are the benefits of Razor View?

0 Answers   NA,


How can you achieve nested Masterpages in 2.0?

1 Answers   Microsoft,


what is aspcompat? what it does?

1 Answers  


Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

0 Answers  


Categories