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


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

Answer / toshimathur


Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Test Cases Interview Questions

How do you review the test cases which are prepared by your team member. answer is: using traceability matrix, matching testcases with the requirements. He again asked - assume that all the test cases are matched with the requirements, then what do you do, how do you proceed in this case..

2 Answers   Mind Tree,

write a testcase for electronic door?

3 Answers  

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

1 Answers  

How to write test case for this scenario. The system shall compare the requested name with the Service Member Name field in the database

0 Answers  

If I have written the 10 Positive test cases first and Negative test cases 11 to 25 .I Execute +ve first & then - ve as per test cases were written .Now if I got the next build & if I write again +ve Test Cases 26-30 first & then - ve 31-35 but I have to execute all test cases 1 to 35.But here the sequence of execution is +ve,-ve,+ve & -ve .How should I maintain the test cases .Please tell me It's Urgent .Thanks In Advance.....Tester

2 Answers   IBM,

How to write email id in world wide web

0 Answers  

Consider the following: Pick up and read the newspaper Look at what is on television If there is a program that you are interested in watching then switch the the television on and watch the program Otherwise Continue reading the newspaper If there is a crossword in the newspaper then try and complete the crossword A. SC = 1 and DC = 1 B. SC = 1 and DC = 2 C. SC = 1 and DC = 3 D. SC = 2 and DC = 2 E. SC = 2 and DC = 3

1 Answers   ISTQB,

how to prepare unit test scripts for accrued interest calculation.

1 Answers  

I would like to have a Test Case on Yahoomail with GUI and Positive and Negative test cases pls its an Argent.

7 Answers   CTS, Cap Gemini,

test cases for landline phone

2 Answers   IBM,

pls i want test cases for oss? whts the process of oss testing

0 Answers   TCS,

Give me 10 test cases on library management system

6 Answers