What is the smallest number of test cases required to Provide 100% branch coverage?

If(x>y) x=x+1;

else y=y+1;



y=x*y; x=x+1;


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

How to write test cases or test scripts for UAT testing which is done manually

0 Answers  

plz tell how to test this: We have to change the password of password field the condition is:The password will expiry after 30 days and that should not allow last 12 similar passwords....

2 Answers   ACS,

Hi, i attended interview in seimens they asked me suppose u have a car which is used by VIP and it has 2 alarms one is at front and other is back when ever smoke or fire is near to car it will detect it and beep alaram so wat r the possible test cases u can write plz give the answer

2 Answers   Siemens,

how we test the login page using jwebunit test case...

0 Answers   CTS,

Write the Load test cases on a water bottle.

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

Roads concatenation Problem Consider we have some GIS (Geo Information System) operating over some road network. Each road represented as array of two-dimensional geographical points. Road network is a set of roads. System has function called Concatenate(). This function takes raw road network and should return optimized road network. Optimization lies in concatenating roads with matching start or end points, i.e. if road AB end point matches road BC start point, then optimized network should contain concatenated road AC. Optimized network shouldn’t contain two roads which can be concatenated. Your task is to suggest set of test cases for Concatenate() function in order to make sure it works correctly. public interface IPoint { double Lat { get; } double Lon { get; } } public Road : List<IPoint> { } public RoadNetwork : List<Road> { } public RoadNetwork Concatenate(RoadNetwork roads);

0 Answers   Infosys,

test cases for restaurant billing system????????

1 Answers   ABC,

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

4 Answers   Manhattan,

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,

How to write test case for this scenario. The system shall allow the user to select an option to sort the results by the city of the family contact

1 Answers  

write the test cases for pen

13 Answers   GE, NEDA,

If there are two document files, from one doc. file we want some text copy & peste into next doc. file. So which are the negative test cases for such scinario.

1 Answers   ABC,