You are on page 1of 1

CS519 FAST-NU Dr.

Ali Afzal Malik

Line Coverage

void nonsense(int a, int b)


{
int x = 1;
int y = 2;

if(x < a && y < b)


{
x++;
y++;
}
else
{
x--;
y--;
}

y = x;

while(y > b)
{
y = y/2;
x = y;
}

x = 0;
y = 0;
}

1. Construct the flow graph of procedure given above.


2. Determine the cyclomatic complexity of the flow graph.
3. Determine a basic set of linearly independent paths of the flow graph.

You might also like