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

Is quality control similar to quality assurance?

637


when do you escalte issue to your manager?

1791


Which test cases are written first: white boxes or black boxes?

795


What is the difference between load and stress testing?

717


negative test cases on banking domain ?

3403






What is regression testing? When to apply it?

673


can you show me the test cases on registration form

1228


Work flow in testing in your company?

1350


10 scenarios for security testing using gmail applications?

7565


Explain briefly your project.

1705


What are the standard you follow in your company to prepare test plan document? Content is same in every standard or not. Also is there any document to read about the testing standards? Thanks in advance for giving me the answer.

1553


Tell me example for Risk,Mitigation,Assumption?

1855


What is internationalization testing (i18n testing)?

717


I have 2+ year of work exp in manual testing and i have good knowledge in QTP.anybody have requirement in your company please please tell me

1467


What is a testbed in manual testing?

955