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 quality center? How many built in tables does quality center have?

1225


What are the Major Functionality for a ATM machine ??

5921


iwant know IEEE formate ,how it is used and exactly where it is used? i have details it follows test plan, testcases...etc. i want real time explanation. pls any one give?

1837


How do you Prepare a Defect Managemnt Policy

2026


Can you explain exploratory testing?

1056


What is a test severity and test priority? difference between them with suitable examples?

1817


What is Mixed Testing

2016


Write the test cases for yahoo home page

2227


What is showstopper defect?

1143


Being an Manual tester, what will be the role or activity in test plan ?

2012


Explain the defect life cycle.

1001


How do you test for the coockies for a web application?

2094


Iam new to testing field and i put lot of experiences so i want to get prepared for the interview in all the ways both in manual and Automation can any one help me how to answer there questions in real time. also can anyone send the top questions and answers to me plz its urget u can mail me at vaisu72@yahoo.com

1870


What types of software testing are available?

1121


What icon is used in WinRunner to get an explanation of the syntax of TSL?

2031