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



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

Answer / toshimathur

B

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Test Cases Interview Questions

how to prepare unit test scripts for accrued interest calculation.

1 Answers  


Who will decide what the test cases you have written are correct?

4 Answers   Mind Q Systems, Satyam,


what is the test plan for ms-word

0 Answers  


how to make test case for anolog voice logger?

0 Answers  


test cases for login window

1 Answers  






pls send me the testcases for telecom billing system

1 Answers   Wipro,


What is the toughest moment you faced in your testing carrier in which everyone praised you?

0 Answers  


Write test cases on for windows media player?

1 Answers   CGI, COG, QMCPL,


They were asking sily questions and definitions rather than practical experience related questions. More focused on Definitions.

0 Answers  


Please Tell me the Real Process of a Company. My company is very small & Developer explains me the feature and I prepare the test cases according to he explained .No one is there to review what I have written in the test cases.Test cases are ok but still I have the knowlege of real testing documents i.e which documents I have to prepare What is the flow starting from requirement gathering.Please tell me ,Thanks in advance .It will really helpful to me

1 Answers  


What is the role of a tester in the test plan preparation? What elements tester physically develops in the test plan document.& what exactly this document contains?

4 Answers   Blue Star,


Can any body please tell me how to test Anti-virus software? I have been asked this question many times in interview.They asked this question for a security tester,performance tester & functional tester perception. Hope u guys will reply me. Any suggestions welcome.........

2 Answers  


Categories