Can u any 1 please explain the below question and answer?
Given the following code, which statement is true about the
minimum 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

a) 1 test for statement coverage, 3 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage

Answer Posted / nayana

a) 1 test for statement coverage, 3 for branch coverage

Since inputs are not specified the above answer is
correct
If inputs are given then apply the given inputs in the
given code & then check it & to confirm u can draw the flow
diagram & check it.
For example u can apply p = 70 & q = 40
For the above inputs, (a) is correct answer

Is This Answer Correct ?    9 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between GUI Testing,UI testing and Usability TEsting

1945


if yahoo ceo asks you to do performance testing for yahoo site, what are the inputs you ask from them?

1616


how to write defects in excel sheets when defects occured

1533


What do you think the role of test-group manager should be? Relative to senior management?

1666


tell me 5 new requirements in ur project? plz urgent

1958






How do you test a web application for dump and deaf??

1585


What is difference between Manual testing and Pega/BPM testing?

7492


What expected result should come when Enter any sql query like “Select * from hello;” without quotes and with quotes.

1212


What is un-installation testing?

651


How soon the bug should get fixed?

621


I have 2 yrs 10 months experience in manual testing. there is a gap of 3 yrs in between. just 3 months before i rejoined the same company. I am looking for new & better job.What I have to enhance my career to up level, should I have to do Automation course or any other. Guide me properly.

1443


can you show me the test cases on registration form

1220


whats main working for tester. and developer, and prject manager.

1655


How do you scope,organise and execute a test project.

1647


Our software designers use UML for modeling applications. Based on their use cases, we would like to plan a test strategy. Do you agree with this approach or would this mean more effort for the testers.

1640