Examsnet
Unconfined exams practice
Home
Exams
Banking Entrance Exams
CUET Exam Papers
Defence Exams
Engineering Exams
Finance Entrance Exams
GATE Exam Practice
Insurance Exams
International Exams
JEE Exams
LAW Entrance Exams
MBA Entrance Exams
MCA Entrance Exams
Medical Entrance Exams
Other Entrance Exams
Police Exams
Public Service Commission (PSC)
RRB Entrance Exams
SSC Exams
State Govt Exams
Subjectwise Practice
Teacher Exams
SET Exams(State Eligibility Test)
UPSC Entrance Exams
Aptitude
Algebra and Higher Mathematics
Arithmetic
Commercial Mathematics
Data Based Mathematics
Geometry and Mensuration
Number System and Numeracy
Problem Solving
Board Exams
Andhra
Bihar
CBSE
Gujarat
Haryana
ICSE
Jammu and Kashmir
Karnataka
Kerala
Madhya Pradesh
Maharashtra
Odisha
Tamil Nadu
Telangana
Uttar Pradesh
English
Competitive English
Certifications
Technical
Cloud Tech Certifications
Security Tech Certifications
Management
IT Infrastructure
More
About
Careers
Contact Us
Our Apps
Privacy
Test Index
GATE Computer Science (CS) 2011 Solved Paper
Show Para
Hide Para
Share question:
© examsnet.com
Question : 57
Total: 65
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 = 0. 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 discriminant 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 the roots. The function returns 0 when the roots are valid and -1 otherwise.
The function also ensures rootl >= 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.
Test cast
Input Set
Expected Output Set
a
b
c
root1
roo2
Return Value
T1
0.0
0.0
7.0
0.0
0.0
-1
T2
0.0
1.0
3.0
0.0
0.0
-1
T3
1.0
2.0
1.0
-1.0
-1.0
0
T4
4.0
-12.0
9.0
1.5
1.5
0
T5
1.0
-2.0
-3.0
3.0
-1.0
0
T6
1.0
1.0
4.0
0.0
0.0
-1
Which one of the following options provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing
T1, T2, T3, T6
T1, T3, T4, T5
T2, T4, T5, T6
T2, T3, T4, TS
Validate
Solution:
© examsnet.com
Go to Question:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Prev Question
Next Question