what is cyclomatic complexity? plz explain with example

Answer Posted / devyani

Below is a simple program as an example:
IF A = 354
THEN IF B > C
THEN A = B
ELSEA= C
ENDIF
ENDIF
Print A
The control flow generated from the program would look like Figure 3.2.
The control flow shows seven nodes (shapes) and eight edges (lines), thus using the formal formula the cyclomatic complexity is 8-7 + 2 = 3. In this case there is no graph called or subroutine. Alternatively 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 ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the status have in QC(Test Management Tool). and how you report?

1445


how mapp the defect id in quality center?

1674


what are the risks and contingencies u had in ur project?

2038


Explain the importance of agile testing?

664


Can you explain an application boundary?

633






What is pesticide paradox?

635


What is a maturity level?

715


I need your help, actually am facing lots of problem in interview am not able to answer in right way what ever questions asked about project. Could you please answer few questions? You must have seen the project I have mention as current project so please help on this, tell me how to explain project in details am prepare on HR module but don’t know how to explain it properly. If you can send me few documents like SRS, and few test case that will help me to get the clear picture, and want ask u what is tier1, tier2, and tier3 in project.

1469


Q) Create Preffered customer: As a customer when i purchase more than $5000 in goods since my first purchase, I become a preffered customer so that i can receive the benefits associated with that status.

1904


What is baseline testing?

640


How can you define state tanstion testing aswell decesion testing with examples.how you can differ them too??

1764


Tell me the SRS based review,brs based review

1673


how to write the test cases for mark as read/unread mails for gmail inbox?and what are the testings we will do?

6086


How will u decide test data to see that evey feature is thoroughly tested

1568


Wat type of questions ll be asked in interview for an 1-2 yrs. experinced persond and i need some database concept question in testing.

1793