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:

  1. A.

    finds the maximum of a, b and c

  2. B.

    finds the minimum of a, b and c

  3. C.

    finds the middle number of a, b and c

  4. D.

    None of the above

Attempted by 310 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…