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 functional 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 , c
d) None of the above
======================================================================
My take - I took a = 1 b= 2 c = 3 and got answer as 2 which is middle element, but that's wrong answer and correct answer is option (d)
So, where am I going wrong?