what is cyclomatic complexity? plz explain with example

Answer Posted / dhakshna

The easiest way is to sum the number of binary decision
statements (e.g. if, while, for, etc.) and add 1 to
it

Below is a simple program as an
example:
IF A = 354
THEN IF B > C
THEN A = B
ELSE A = C
ENDIF
ENDIF
Print A

one may calculate the cyclomatic complexity using the
decision points rule. Since there are two decision points,
the cyclomatic complexity is 2 + 1 = 3.

Is This Answer Correct ?    109 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You may undergone many projects. Do all the projects match up with customer’s expectations?

708


If anyone have attended interview with deloitte for the post of senior manual test engineer. Please share the interview process and the questions asked. How to prepare for the interview. Thanks in advance

4402


define risk management system with example ?

1565


I have an Interview about Guidewire claimcenter,so could you provide any info regd it?.I would really appreciate any kind of help- email at hvshah2001@gmail.com

1975


How can write testcases on a code under development pls give asnwer

1539






I studied MBA, I want learn any softwarecourse, which course is better hadoop or testing tools(manual+selenium?)

1212


i need some objective type papers for my certification

1759


What if an organization is growing so fast that fixed testing processes are impossible? What to do in such situations?

972


What is the difference between static testing and dynamic testing?

654


What are the two main categories of software testing?

692


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"

2512


how can we give (ASSIGN) bug privitorirs and seviroty to the bug explain with exanple

1808


How to Generate Test Case for Shopping Cart?

2409


What is the Testing strategy for testing client server applications/products?

1832


send the senario template

1494