Dharmendra Gaur
what is cyclomatic complexity ?
Posted by Dharmendra Gaur in General | Others on Apr 29, 2010
0
Do you know the answer for this question? Post it below.
Guest

Cyclomatic complexity of a piece of code is the number of different paths available in the execution of the program.


If there is no branching (if-else or switch statement) and looping (while, for & do-while loop), then the statements will execute linearly in the function. Hence cynclomatic complexity = 1;

A Branching breaks the linear flow of execution in two parts increasing the Cyclomatic complexity of the program. Same goes for the looping statements.

Hence the more level of indentation we have in our program the more will be the Cyclomatic complexity. 

Posted by Kamal Rawat on Apr 29, 2010
Sponsored by
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Sponsored by
Nevron Gauge for SharePoint
Become a Sponsor
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | REPORT ABUSE © 2011 C# Corner. All contents are copyright of their authors.