Consider the following C function definition. int Trial(int a, int b, int c) {…
GATE · 1999 · CS · Question 2 subparts
Consider the following C function definition.
int Trial(int a, int b, int c)
{
if ((a >= b) && (c < b))
return b;
else if (a >= b)
return Trial(a, c, b);
else
return Trial(b, a, c);
}
The function Trial:
- A.
finds the maximum of a, b and c
- B.
finds the minimum of a, b and c
- C.
finds the middle number of a, b and c
- D.
None of the above
Attempted by 310 students.
Sign up free to check your answer
Sign up freeLoading lesson…