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.
- read x, y
- Result 1= 1
- Result 2 = 1
- counter = 1
- repeat
- result 1= result 1*x
- counter = counter + 1
- Until (counter > y)
- counter = x
- Do while (counter > 0)
- result 2= result 2*y
- counter = counter - 1
- End Do
- If (result 1 > result 2)
- then print "x^y is greater than y^x"
- else print "y^x is greater than x^y"
- End if
- 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
Get step-by-step solutions from verified subject matter experts
