For the following piece of code, how many test cases are needed to get 100% statement coverage?

Procedure X

Read (Color) // Input color from user

IF (Color == “Red”) THEN

Call Roses(Color)

ELSEIF (Color == “Blue”) THEN

Call Violets(Color)

ELSE

PRINT “User is no Shakespeare”

SaveToDatabase(Color)

End Procedure X

A. 5

B. 3

C. 1

D. 2






Answer / toshimathur

B

Is This Answer Correct ?    0 Yes 0 No

Post New Answer




More Test Cases Interview Questions

What are the processes / steps invovled in Defect Prevention meeting?

1 Answers  


difference between scenario and testcases?

5 Answers   Satyam, CarrizalSoft Technologies,


What is the difference between System testing and System Integration testing?

4 Answers   Infosys,


What are the detailed test cases for Vacations Rental websites (Admin,Traveler,Rental owner)?

0 Answers  


who will prepare enhacement report?mail me at gavaskarreddy149@gmail.com

1 Answers   Ordain Solutions,


How to write testcases for username creation?Given requirements are min 6characters,atleast one alphabet,alpha,alphanumric

1 Answers  


test cases for calculator ,this should accept integer form +99 to -99(perform addition operator).need to raise defects

4 Answers   Wipro,


write a test case for a pen and paper regarding writing.

11 Answers   Wipro,


How should write test case (i.e. in proper format or simply step by step) in an interview test paper?

1 Answers  


(questions asked in interview)hi every one can any one please answer to this questions.these questions were asked in an interview.i have another interview next week . 1.when the time schedule is tight how will you approch the testing,and the relese is nearing and we need to finish testing how can we follow in that case.do we need to exicute all the test cases or can priortise and leave some to next relase. 2. when a new feature is added to the existing application we need to add new test cases but after that do we need to change all the existing test cases and while running do we need to exicute entire application test cases or only the new feature test cases and related new feature test cases. 3.do you have any situation where you have to write and exicute the test cases same time, how will you follow.does it happens in real time. 4.example of bug which is not reproducible.like tester say that there is bug and developer say no can some example of such bugs. 5.during regression testing some times do we need to add new some additional test cases to test that bug.

2 Answers  


write a test case on web login and bank application and client server

60 Answers   Adobe, CTS, TCS, Semantic Space, MBT, Reliance, Ciber, Login, Tech Mahindra,


write a test case for student admission form

2 Answers  




Categories