Page 1 of 1

1. Generate the test cases for the following code with statement testing, branch testing and path testing. Describe the

Posted: Mon May 02, 2022 11:44 am
by answerhappygod
1 Generate The Test Cases For The Following Code With Statement Testing Branch Testing And Path Testing Describe The 1
1 Generate The Test Cases For The Following Code With Statement Testing Branch Testing And Path Testing Describe The 1 (38.27 KiB) Viewed 39 times
1. Generate the test cases for the following code with statement testing, branch testing and path testing. Describe the procedures in test case generation. //This program is supposed to calculate the sum from //m to n (inclusive). If n is smaller than m, switch //them first. The following code is not tested yet. #include<stdio.h> int main() { int i = 1, sum 0; int m, n, temp; scanf("%d%d", &m, n); if (m>n) { temp-n; n - m; m-temp; } i = m; while (i<n) { sum += i; i++; } printf ("sum %d\n", sum); return 0;