Computer Science and Information Technology - CSE

Question of the Day
GATE 2010   CS   Question No. 44

The following program is to be tested for statement coverage:
   if (a = = b) {S1; exit;}
   else if (c = = d) {S2;}
   else {S3; exit;}

The test cases T1, T2, T3 and T4 given below are expressed in terms of the properties satisfied by the values of variables a, b, c and d. The exact values are not given.
T1: a, b, c and d are all equal
T2: a, b, c and d are all distinct
T3: a = b and c != d
T4: a != b and c = d

Which of the test suites given below ensures coverage of statements S1, S2, S3 and S4?

GATE Admission Predictor
GATE Coaching Institutes