If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage?

1. If x=3 then

2. Display_messageX;

3. If y=2 then

4. Display_messageY;

5. Else

6. Display_messageZ;

7. Else

8. Display_messageZ;

A. 1

B. 2

C. 3

D. 4

Answer / toshimathur


Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Test Cases Interview Questions

Do we have to write the seperate test cases for System testing and UAT testing? And also what are the roles and reponsibilities of a tester/how to interact when End users are performing the UAT Testing.

0 Answers  

Tell me number of test cases required for full statement and branch coverage: Read P Read Q IF P+Q > 100 THEN Print “Large” ENDIF If P > 50 THEN Print “P Large” ENDIF

2 Answers   Siemens,

How to write test scenarios for a Web application, with an example?

3 Answers   TCS, Deloitte, LiveTech,

hi there... can any1 tel me hw to prepare a traceability matrix by taking a practical scenario..i know the theory part bt dont kno how to implent dat..

3 Answers   TCS,

How would you test a cup and or pencil?

2 Answers  

How many test cases u will write for Acceptance testing?

0 Answers  

Write the functional,system test case for a electric bulb which have two electric switches.

4 Answers   Manhattan,

There is project earlier it was developed in VB then they had replaced the project by java and there is no documentation available then how you are going to check that project. (Hint: - Parallel Testing).

2 Answers  

i need Usability test case for home page?

4 Answers  

150 integration testing scenarios for gmail

0 Answers  

how will we know test cases are written by us are correct

5 Answers   TCS,

how many test cases u write in day while testing yr application.and wat z ur role after u finished testing application plz do reply

9 Answers