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

consider therez 1 land and it has mango trees in it, what are the tets cases or how will we count no of mangoes on all trees

2034


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

5931


Hi Could someone please provide Siebel Testing Interview questions for 5 years exp.

4928


What are quality assurance and quality control?

1200


Please can any one tell me 1).Types of reports 2).Types of Meetings.

1846


There is only requirements document. You have 10 days and 8 resources to release the system.At the end of the 8th day u tell ur TL that system is ready for release. How will you proceed with the testing process or in other words what all approach you will follow once you get requirements

2197


What does entry and exit criteria mean in a project?

1174


What are the cases when you’ll consider to choose automated testing over manual testing?

1138


How the application is launched to the production environment?

1700


WHAT IS PROTOCAL TESTING..EXPLAIN? L2, L3 PROTOCALS TESTING MEANS WHAT?EXPLAIN BRIEFLY

6805


You want a automation tool to be used for your project. How will you convince the client for the same. Please give me specific answer.

1976


What is a bug triage?

1282


write test condition for testing SMS service of a mobile phone maximun length is 100 character while sending and 80 character for receiving write test scenarios do not write test cases

3549


My name is Akpos from Nigeria. I have finished manual testing course. Please, can someone advise me where to go on from here?

1039


what is JAVA TESTING? What Testers will do in JAVA Testing. Can any one Give suitable Ans Pls. it's urgent

2055