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

Hi to all, im vaibhav i joined a MNC as a tester and i got a banking (HSBC) project can any one tell me as a fresher what kind of strategy i sholud use to perform better. thanx

2148


Hi i am looking for Test Engineer Job, i have done the course, but i don't have work experience on it, Is it So important to have real time Exp or knowledge is enough? and please let me know like how i can improve for the interview. You can send me a mail on this id: rashmi_vastred@yahoo.co.in

1867


Scenario-based testing Option 1 concentrates on actor and software interaction Option 2 misses errors in specifications Option 3 misses errors in subsystem interactions Option 4 Both 1 abd 2

3332


Can you explain decision tables?

910


Can you explain calibration?

898


could u pls anyone tel me .."which is the best instute that provides eficient practical knowledge and also real-time oriented knowldge to do a project in manual and automation testing..in hyd" pls send me to dis mail-id if u find any..? sinducute17@gmail.com

1944


What is a maturity level?

985


Describe your experiences with code analyzers.

2010


In manual testing, what are stubs and drivers?

914


What is the big deal about ‘requirements’?

996


How to test the below code and write test case? Prove that this code is wrong? int add(int a ,int b) {return a+b; }

1815


Can anyone tell me, What is wound fixing?

2380


Hi friends, currently i am working with banking domain project in the part of testing..what kind of questions will be ask at interviews.. can anybody listout the project oriented questions which are asked in interviews...

3703


What is the difference between manual testing and automation testing?

928


Write the 10 high test cases for making video call/face time

7946