Question: 1. insertProcedure (int a[], int p [], int N) 2. { 3. int i, j, k; 4. for (i=0; i
1. insertProcedure (int a[], int p [], int N) 2. { 3. int i, j, k; 4. for (i=0; i<=N; i++) 5. p[i] = i; 6. for (i=2; i<=N; i++) 7. { 8. k = p[i]; 9. j = 1; 10. while (a[p[j-1]] > a[k]) 11. { 12. p[j] = p[j-1]; 13. j--; 14. } // end while 15. p[j] = k; 16. } // end for 17. } // end insertProcedure |
Use the method above to answer the following questions.
Draw the control flow graph. To simplify grading, use the line numbers for node numbers. For example, the node that represents the while statement should be node 10. (You will not need all the numbers.)
Give Reach (6), the set of reachable nodes from node 6.
Give one path that is not a test path.
Give one test path that is not a prime path.
List the edge-pair coverage test requirements for the graph. You do not need to list TRs that are less than
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
