Question: Consider the following code that accepts two positive integer numbers as inputs. read x, y Result 1= 1 Result 2 = 1 counter = 1

Consider the following code that accepts two positive integer numbers as inputs.

  1. read x, y
  2. Result 1= 1
  3. Result 2 = 1
  4. counter = 1
  5. repeat
  6. result 1= result 1*x
  7. counter = counter + 1
  8. Until (counter > y)
  9. counter = x
  10. Do while (counter > 0)
  11. result 2= result 2*y
  12. counter = counter - 1
  13. End Do
  14. If (result 1 > result 2)
  15. then print "x^y is greater than y^x"
  16. else print "y^x is greater than x^y"
  17. End if
  18. End

42. Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

How many nodes are in the program graph ?

a.

16

b.

17

c.

18

d.

19

e.

None of the above

43 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

How many branches are in the program graph ?

a.

21

b.

22

c.

23

d.

24

e.

None of the above

44 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

How many test data are required for statement coverage ?

a.

1

b.

2

c.

3

d.

4

e.

0

45 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

How many test data are required for branch coverage ?

a.

1

b.

2

c.

3

d.

4

e.

0

46 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

The minimum number of test data required for path coverage is ....

a.

1

b.

2

c.

3

d.

4

e.

None of the above

47 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

A possible test data for statement coverage testing is

a.

1, 1

b.

1, 2

c.

2, 1

d.

2, 2

e.

Any of the above

48 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

A possible data for branch coverage testing is

a.

1, 1

b.

1, 2

c.

2, 1

d.

2, 2

e.

Any of the above

49. Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

The number of test data required for path coverage in the above program

a.

is equal to the number of test data required for statement coverage in the above program

b.

is equal to the number of test data required for branch coverage in the above program

c.

is greater than the number of test data required for statement coverage in the above program

d.

is less than the number of test data required for branch coverage in the above program

e.

None of the above

50 Assume that the program graph for the above program includes every statement, including the dummy statements such as 'End If' and 'End', as separate nodes.

How many possible paths are in the program graph ?

a.

1

b.

2

c.

3

d.

4

e.

None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!