GATE | GATE CS 2011 | Question 47
The following is the comment written for a C function.
/* This function computes the roots of a quadratic equation
a.x^2 + b.x + c = . The function stores two real roots
in *root1 and *root2 and returns the status of validity
of roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discreminant is positive
(iii) When discriminant is zero
(iv) When discriminant is negative.
Only in case (ii) and (iii) the stored roots are valid.
Otherwise 0 is stored in roots. The function returns
0 when the roots are valid and -1 otherwise.
The function also ensures root1 >= root2
int get_QuadRoots( float a, float b, float c,
float *root1, float *root2);
*/
A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.
Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?
(A) T1,T2,T3,T6
(B) T1,T3,T4,T5
(C) T2,T4,T5,T6
(D) T2,T3,T4,T5
Answer: (C)
Explanation: 
T2,T4,T5 and T6 belong to different classes. Hence it gives an optimal test suite.
Recommended Posts:
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 6
- GATE | GATE CS 2011 | Question 32
- GATE | GATE CS 2011 | Question 21
- GATE | GATE CS 2011 | Question 22
- GATE | GATE CS 2011 | Question 23
- GATE | GATE CS 2011 | Question 24
- GATE | GATE CS 2011 | Question 25
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 27
- GATE | GATE CS 2011 | Question 28
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 64
- GATE | GATE CS 2011 | Question 63
- GATE | GATE CS 2011 | Question 65




