Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Given the following function: int ex1 (int x, int y) { int z=0; if (x3 && y 5){ z=1; x= y-x; if (y == 5

Given the following function:

int ex1 (int x, int y) {

int z=0;

if (x3 && y 5){

z=1;

x= y-x;

if (y == 5 || zy){

z:= 2;

y:=z;

}

}else{ if (x==3 && y z){

z=0;

y=x;

}

}

y=z;

}

Generate a test suite which gives the maximum coverage with the statement coverage criterion.

Exercise 2

Write a simple piece of code (pseudo-code is also fine), for which it is impossible to reach 100% statement coverage.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions