what is cyclomatic complexity? plz explain with example

Answer Posted / keerthana

example
int a,b;
a=10,b=20;
if(a<b)
{
printf("a is greater");
}
else
{
printf("b is greater");
}
draw the flow chart for this program and count number nodes
in the flowchart.
the formula is v(G)=E-N+2P
E is edge
N is number of nodes
p predicated node
for eg
V(G)=E-n+2P
4-4+2=2
the path of the program is 2 we got write answer

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between load testing and performace testing?

691


Hi Friends, I've to submit a presentation in my office about "Different bug tracking tools" ? Where can i find (or any site) the templates for the bug tracking tools.

1403


how to verify a button size (e.g Login Button) on a web page have same dimension prescribed by Client in UI Testing..??

1155


How will you set the Dependency in the Quality center? Say if you will fail a test case and two or more test cases are dependent on that particular test case. In this case how will you handle in failing the test case.

2238


write the test case for Bulb & Mobile phone

7417






What type of testing you perform in organization while you do system testing, give clearly?

701


What are the benefits of requirement traceability?

664


hi, I m looking for a career in manual web testing. so PLZ anybody who have the practical knowledge of dis field help me. GIVE ME UR MAIL ID so that i can ask regarding some doubts. my MAIL ID is ankurtester819@gmail.com

1467


Write 2 scenarios for Integration testing? Please let me know its urgent.

1568


Risk Analysis a) 2 step, b)3 step, c) 4 step, d) 6 step

1614


What is sanity?

632


What are different types of verifications?

703


What is an exit criteria?

665


How to do Performance Testing manually for a Flash Application?

1856


How to find bug in photos and videos ??

1745