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 write test cases for the Sorting the Group Name, Group Number, Individual Count, Group Count.

0 Answers  


Give me real life some test cases

1 Answers  


Explain the concept of semi-random test cases?

0 Answers  


Explain the soak testing?

0 Answers  


Need help to write test case for "Check Availability" field. Any help would be highly appreciated!

1 Answers   TCS,






write the system testcase and functional testcase for the below scenario scenario: view the balance in online account

5 Answers   CTS,


how to prepare unit test scripts for accrued interest calculation.

1 Answers  


what are those parameters or matrixes for tesing a software user interface?

2 Answers  


How we apply Test case like integration testion on calculating result or for calculation GPA..... plz urgent need???:(

0 Answers  


What is ramp testing?

0 Answers  


what is the test plan for ms-word

0 Answers  


WHAT IS THE MEANING OF RISK BASED TESTING WITH EXAMPLE pls this is urgent Thanks in advance

5 Answers   3M,


Categories