Find the Cyclometric complexity on the following p
seudocode

Do while records remain
read record;
if record field#1=0
then process record;store in buffer;
incremental counter;store in file.
reset counter;end if end do

please let me know the procedure too.

Answer Posted / roshni

The answer for this is 3

3 formula's to calculate Cyclomatic complexity. You can
choose either of them...
C.C = No of bounded regions +1
C.C = No of edges - No of nodes +1
C.C = No of predicate Nodes +1

Now let's consider the first formula to calculate as the
rest 2 diagrams require flow graphs to be drawn.

Do while loop forms 1 bounded region
and IF condition forms 1 bounded region.

So as per this formula, C.C = No of bounded regions +1
2 + 1 = 3

Is This Answer Correct ?    10 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

do we need to write test cases for workflow of the product for instance: there is 2 module "TRAINING ASSIGN MODULE" and "EMPLOYEE" in TRAINING assign MODULE iam assigning training to employee setp is 1.selct traning "oracle" 2.select employee u want assign "peter" 3.apply. now to check whether training assign or not GOTO EMPLOYEE module 1.click on "peter" 2.click on 'view assign to employee'link.now this is a flow do i need to write test cases for this fllow.plz help me guy mail me nirmal_rawatt@rediff.com

1589


What are the major components of Perf Test Report?

1608


hello frens. Im Arun from the uk. im planning to apply for tester jobs with 3yrs experience. the problem is i dont have resumes. i have to mention atleast 3 projects (preferably financial projects) in my CV. im totally blank. can u plz send ur CV's to my email.... arunmoses1982@yahoo.com. this would be a great help from you guyz. n u need any help from me? just mail me n ill get in touch with u. Thanx.

1462


what type of quetion may be asked for experienced person in manual tester of 1 year?

1836


What is neutral test case?

1814






What is pesticide paradox? How to overcome it?

790


Is Anyone attended the manual testing interview with capgemini in recent past. please let me know the type of questions they can ask. Thanks

2886


I am having 2 years of experience in Manual Testing, 2marrow I have an interview with a Company. Which type of questions they will ask me?How should I prepare for interview?Please guide me so that I will clear the interview.

1753


where do we work with Application, web and Database servers Means which type of applications.

1469


What is revision history and the content of revision history table?

1560


What are different types of verifications?

703


What is bug, deffect, issue, error?

816


What is ecp (equivalence class partition)?

690


what is difference between win 98 and win 2000 poertating system?which is better one?

1731


Hi I want to start online training couses for testing Any body plz help me out how to start the online courses Plz post the answer here or send me a mail for kommineni.1020@gmail.com

1709