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

Could someone answer the following testing Questions? 1)Give 5 reasons why a build can be released with bug 2)Write a bug report for a word processor program which crashes when the contents of 89th column is been sorted in assending order. 3)write test 10 cases for program which has a table with 2 fields of NAME od char type and CLASS of INT type.NAME fields is truncated after 26 charaters and CLASS takes value between 1 to 9 both included. There are 3 possible opearations program can perform a)When a new student joins the class the program adds a new field b)When student leaves the class the field get deleted c)when student gets promoted then program incremts the class by 1 Write 5 test cases for the scenario. 4)write 10 test cases for a program that takes date in dd/mm/yyyy format and prints it out with a increment of 1. for dates (dd) can be given in the range 1<=dd>=30 for months (mm) can be given in the range 1<=mm>=12 for years(yyyy) can be given in the range 1600<=yyyy>=9999 5)Give 5 bugs that could cause a program to crash when it printed the 999999 th pages 1000001th line.

6 Answers   Adobe, Android,

What could be test cases for windows calculator using risk based testing

1 Answers  

Write the Load test cases on a water bottle.

5 Answers   NIC, IBM, Cognizant, Microsoft, Logic,

what do you mean by test case specification

5 Answers  

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 end if if (Condition 2) then statement 3 end if A. 2 Test Cases B. 3 Test Cases C. 4 Test Cases D. Not achievable

1 Answers   ISTQB,

What we do when the Requirements are continuously changed?

2 Answers   Infosys,

What is Unit Testing ? What is Integration Testing ? What is acceptance testing ? What is Static testing? What is System testing? What is Load Testing? What is Smoke Testing? What is Soak Testing? What is Scalability Testing? What is Sanity Testing? What is Ramp Testing? What is Monkey Testing? What is Gray Box Testing? What is Functional Testing? What is Glass Box Testing? What is Dynamic Testing? What is Compatibility Testing? What is Concurrency Testing? What is Component Testing? What is Ad Hoc Testing? What is Agile Testing?

1 Answers  

how to write test cases for a text field that should have maximum 250 characters

8 Answers  

if u have a application that is demo verson and u want to perches it if u have full version. Plz give me some test case for try to break the applicatin

1 Answers  

hai........... please tell abt testcases.. how we can drived the testcases in project?

1 Answers  

In a log in page what will be test procedure,test scenario,test discription & test steps?

1 Answers  

can any one give the format of writing test cases in excel sheet.

33 Answers   Aricent,