Professional Documents
Culture Documents
P.T.O
1
2. 5 *4 = 20
(a) Passengers who travel more than 50,000km. per calendar year and in addition, pay cash
for tickets or have been travelling regularly for more than eight years are to receive a
free round trip ticket around India. Passengers who travel less than 50,000km. per
calendar year and have been availing railway services regularly for more than eight
years also get a free ticket around India. Design test cases for this system using decision
table testing.
(b) What do you mean by regression testing? When is regression testing carried out? Why
is regression testing necessary?
(c) Designed an optimal test suit using MC/DC testing for the following expression:
a && (b || c)
(d) Consider the following program:
#include<stdio.h>
main()
{
int a, b, c, d;
clrscr;
printf(“Enter the two variables a,b”);
scanf(“%d %d”, &a, &b);
printf (“Enter the options 1:Addition, 2:substraction, 3:multiplication,
4:division”);
scanf(“%d”, &c);
switch(c)
{
case 1:d = a+b;
printf(“Addition of two numbers = %d”, d);
break;
case 2:d = a-b;
printf(“Subtraction of two numbers = %d”, d);
break;
case 3:d = a*b;
printf(“Multiplication of two numbers = %d”, d);
break;
case 4:d = a/b;
printf(“Division of two numbers = %d”, d);
break;
}
}
Perform static data flow analysis for the above program by finding out the define-use-
kill patterns for the variable d in the source code.
3. 10*2= 20
(a) Design black-box test suite for the following program. The program accepts two pairs
of co-ordinates (x1,y1), (x2,y2), (x3,y3), (x4,y4). The first two points (x1,y1) and
(x2,y2) represent the lower left and the upper right points of the first rectangle. The
second two points (x3,y3) and (x4,y4) represent the lower left and the upper right
points of the second rectangle. It is assumed that the length and width of the rectangle
are parallel to either the x-axis or y-axis. The program computes the points of
intersection of the two rectangles and prints their points of intersection.