This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: fragments given on pages 336337, textbook. a. 4 (3 ifs +1) b. 5 (1 switch + 3 ifs) c. 3 (2 for loops) 3. [20] Q519. Use the branch condition testing strategy to generate a set of tests for each of the following statements. For the following code, a test is the values of a and b. Cover the possible errors given in slides 16&17 in lecture 16. You don’t have to do the domain testing. a. if (a < b  prt1 == NULL) proc1(); else proc2(); a > b & prt1 ==NULL a > b & prt1 !=NULL a < b & prt1 ==NULL a < b & prt1 !=NULL a == b & prt1 ==NULL a == b & prt1 !=NULL b. if (a < 5 && b > 7) proc1(); else if (a < 5) proc2(); else if (b > 7) proc3(); else proc4(); a < 5 && b > 7 a < 5 && b < 7 a < 5 && b == 7 a > 5 && b > 7 a > 5 && b < 7 a > 5 && b == 7 a == 5 && b > 7 a == 5 && b < 7 a == 5 && b == 7...
View
Full Document
 Spring '08
 ZHANG
 embedded system, following code fragments, CDFG, prt1 ==NULL

Click to edit the document details