Consider the function find {int x, int y} [Programming with C]

  • 0 replies
  • 273 views
*

Offline mechanic

  • *****
  • 2565
    • View Profile
    • Engineering Forum
Consider the function find {int x, int y} [Programming with C]
« on: February 25, 2017, 08:58:55 AM »
Consider the function

find {int x, int y}
{return {(x < y) ? 0 : ( x - y)};}

let a,b be two non-negative integers. The call find {a, find (a, b)} can be used to find the

Options are:


A. Maximum of a, b
B. Positive difference of a, b
C. sum of a, b
D. minimum of a, b

correct answer is:

D. minimum of a, b