Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is cyclomatic complexity? plz explain with example

Answer Posted / dheemanth kumar

Cyclomatic complexity is a software metric (measurement).
It was developed by Thomas McCabe and is used to measure
the complexity of a program. It directly measures the
number of linearly independent paths through a program's
source code.
M = E &#8722; N + 2P
where

M = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components.
"M" is alternatively defined to be one larger than the
number of decision points (if/case-statements, while-
statements, etc) in a module (function, procedure, chart
node, etc.), or more generally a system.

Separate subroutines are treated as being independent,
disconnected components of the program's control flow graph.


[edit] Alternative definition
v(G) = e &#8722; n + p
G is a program's flowgraph
e is the number of edges (arcs) in the flowgraph
n is the number of nodes in the flowgraph
p is the number of connected components

[edit] Alternative way
There is another simple way to determine the cyclomatic
number. This is done by counting the number of closed loops
in the flow graph, and incrementing the number by one.

i.e.

M = Number of closed loops + 1
where

M = Cyclomatic number.

Is This Answer Correct ?    19 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is smoke testing and what is sanity?

1123


1.What types of documents would you need for QA, QC, and Testing?

5832


Hi could some one please send me the testplan testcases(for 2Modules) and testscripts for mercry fliht aplication or gmail. please write those on templates and send me.In testplan plase write Testobjective, test scope, est approach, exlusions assumptios.

2086


value momentum

1757


which of the following is not a coding defect? Option 1 Test harness defect Option 2 Data flow defect Option 3 Initialisation defect Option 4 Algorithmic defect

2261


what are the possible test cases for online jobs search portal..if its a job seeker module and any 1 if u had worked on this proj pls share the bugs with sev and priority pls frends i need replies for these queries ..thanks in advance

7572


Hi All. How can we write negative test cases for Logout Operation ? Please place the answer with a few details and if possible add some related object properties. "A tester exposes his/her ability not only by words he/she also proof it by work"

2958


Define Stability, Scalability and reliability with example ?

3181


What is frame level testing and how do we test it?

2473


Explain about PET Model?

2637


1.what kind of testing have you done ?

2804


Any one send me sample question for multimedia testing with microsoft access database. I am having interview next week. Please post it or send me my personal e-mail. Thank You

1996


Anyone tell me the test cases of Shopping Favorite

1956


what is entry and exit criteria and explain it?

1457


What is severity and priority of bug? Give some example.

1139