Functions in C

  • + 2 comments

    return (m1=a>b?a:b)>(m2=c>d?c:d)?m1:m2;

    The first part of the return statement, (m1=a>b?a:b) is saying if a>b, let m1 = a, else m1 = b.

    The second part is saying, (m2=c>d?c:d), if c>d then let m2 =c else m2=d

    Finally the third part is saying compare m1 with m2. If the m1>m2 return m1 else return m2.