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

As you are working with cmmi level 5 company ,can you tell me what processes you r following as QA engineer?

2036


What is a critical bug?

657


how to connect your project in database?

1523


How can you prepare the resume for testing? Can you send me the answer for this questions?

1510


Hi, this is murthysharma. I need very urgently about some terms which are used in use cases? Plz give reply to me, if any body know, It is really very very urgent. 1. what is the difference between basic flow,exception flow and alternative flow? 2.what are non-functional requirements in use cases? 3.what are exceptions, special requirements, business rules, assumptions, constraints. Kindly give me with the example. Bcoz, I am very new to this use cases. thanks in Advance. Regards, M.MurthySharma

1526






1.what is the approach while writing test cases in your project. 2.tell some intresting scenareo in your project

1825


What is regression testing? When to apply it?

673


What is Independent Testing?

1601


Write all combinations of test cases for calculater on + symbel

1807


Easiest way to write test cases? How i can learn writing the test cases?

943


What type of projects can include in Logistics Domain? and what is the type of domain for project which include Driving license renewal, Different type of title registration etc...

2536


What is white box testing?

758


Can you explain tailoring?

700


whats the reason to display the password(not in encrypted form) in the script in load runner but not in QTP?

1455


What are all the netwoking tools, hardware tools and software tools required for testing a web-based n client server applicatopn?

1463