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

how to write a test cases for courier offices?

0 Answers  


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  


Write a test scenario for a project which is developed in a VB then after wards it is converted in Java and there is no documentation available.

2 Answers  


Let me knw the testcases for opening an account and for billing in shopping malls..?/?/?

3 Answers   Semantic Space,


consider a program module that inputs two (2) values, n and max, and computes the sum of the first n integers as long as this sum is less than max; otherwise an error should be reported. if n is negative, then it takes the absolute value. a) list the equivalence partitions, and b) list the boundary values.

0 Answers  


14. How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other : - ………… if (Condition 1) then statement 1 else statement 2 fi if (Condition 2) www.istqb.guru then statement 3 a. 2 Test Cases b. 3 Test Cases c. 4 Test Cases d. Not achievable Please explain this how to solve?

1 Answers   ISTQB,


What is SECURITY TESTING?

1 Answers  


can anyone send me a copy of a business requirement and test cases attributed to such requirent. thank u

0 Answers  


Can anybody help me in writing test cases for a scenario? need help at the earliest. will send you the requirement doc to your email id. thanks raj

0 Answers  


How will you review test cases?

26 Answers   TCS, HCL,


what is not present in the test case? 1>requirment ID 2>test case ID 3>bug ID 4>objective

30 Answers   TCS,


What is the Difference between Testing Types and Testing Techniques

4 Answers   ISTQB,




Categories