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)


PRINT “User is no Shakespeare”


End Procedure X

A. 5

B. 3

C. 1

D. 2

Answer / toshimathur


Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Test Cases Interview Questions

Write Test cases for the below scenario? scenario 1: Replace the current CSS software with TML software. Scenario 2: Provide the same reports for business as currently provided by CSS software. Not: CSS and TML are customized software.

0 Answers   Microsoft,

What all comes under test case review?

5 Answers   TCS,

HI i'm Ramu new join as manual tester plz send me test cases for web application testing i need basic idea's

1 Answers  

How to test Webservices and how can we write test cases for that

0 Answers  

How to write test data for login module?

5 Answers  

What is the difference between Test Input and Test Data??

2 Answers  

Write the 3 TestCases to prove tht it is a softdrinkbottle or not.

9 Answers   Minecode,

what are the inputs required for writing test cases

2 Answers   Satyam,

I want 100 test scenario for gmail

0 Answers   TCS,

Write a test case on a durability of an electric bulb and test it that it will last for next 10 months.

0 Answers  

plz tell how to test this: We have to change the password of password field the condition is:The password will expiry after 30 days and that should not allow last 12 similar passwords....

2 Answers   ACS,

Can someone help to write testcase for the scenario as early as possible.: 1. Complaint logged since one week 2. complaint info sent to supervisor with high priorit mail 3. 10 users logged into website , performance could not be degraded ( response within 5 seconds) 4. site should be user protected. 5. it should be work with IE 6 IE 7 6. complaint log should be generated more than one week

0 Answers