Question: Software testing Consider the following loop statement in C: Int max_size = 10; for (n = 0; n < max_size && (c = getc(yyin)) !=

Software testing

  1. Consider the following loop statement in C:

Int max_size = 10;

for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != ; ++n)

buf[n] = (char) c;

A

B

C

ID

input

n < max_size

c = getc(yyin) != EOF

c !=

Result

1

n = 5; c = X

True

True

True

True

  1. Derive a set of test cases that satisfy the compound condition adequacy criterion with respect to the loop. Document your test cases by extending the table 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 Databases Questions!