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

Write all test cases for any credit card.

13 Answers  

Suppose that you're running tests on windows calculator and find that 1+1=3, 2+2=4, 3+3=7, 4+4=8, 5+5=11, 6+6=12. write a bug title and bug description that effectively describes this problem.

4 Answers   Manhattan,

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  

How to write test cases for manual testing? What are the main syntex for writing test cases for Junit?

0 Answers   Wipro,

2.6.3 User Interface Different Polls could be present at different channels, pages within channels, and at home page. User interface for Poll will be as described below: - Beneath poll current result(running status) to be shown in graphical form(say progressing bar chart) all the time, in same window as poll. - Link ""All Polls >>"" to take user to Polls home page which will have all the active polls with results underneath. - All the polls not older than one month will come under Active polls category. - User can take Active open polls, but cannot react to Active closed polls. Can only view results of active closed polls. - No Interactives available for polls - "Add a comment", "Rate" - Registered User can take a poll only once, after that only result is shown to user. To unregistered user it will be open. 2.6.4 Interfacing/Sourcing Details - Polls is going to be a separate module, an internal application, which editor/admin can publish. - Admin/Editor should be able to publish polls on separate channels, pages. Assign closure dates. - Admin/Editor can upload images, change look n feel, add a brand, link/url to it. - System to capture user details(screen name/name, id, email id), do loyalilty points calculation and add to user loyality points. 2.6.5 Rules and Conditions Unless assigned a closure date, by default all Polls will be open for 30 days. this is the SRS how to write the test cases for the above functionalities help me

1 Answers   GE,

test case for digital camera

2 Answers  

i am preparing for interviews in real time job what test cases we have to prepare please explain with example?

0 Answers  


0 Answers   Accenture,

how we canwrite a test case on computer?

5 Answers   IBM, Satyam,

write testcase for sql table? this is the question asked by interviewer?

4 Answers   IBM,

please can anybody tell me, how to indentify the test cases which can be automated from a given set of test cases, say 20.

2 Answers  

Which testing is important, positive testing or negative testing. Test cases for postive and negative testing for a given functionality.

1 Answers