first program
fault:
we can not reach the first element. the conditional statement should be i >= 0;
a test case that does not execute the fault: x=null;
a test case that execute the fault, but does not result in an erroe state: x={3,4,5},y=5;
a test case that results in an error, but not a failure: x={3,4,5},y=1;
second program
fault:
it would found the first zero, the conditional statement should be(int i=x.length -1; i>=0; i-- )
a test case that does not execute the fault: x=null;
a test case that execute the fault, but does not result in an erroe state: x={0}
a test case that results in an error, but not a failure: x={3,4,5}