Author Topic: Consider the function find {int x, int y} [Programming with C]  (Read 313 times)

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 2638
    • View Profile
    • Engineering Forum
Consider the function find {int x, int y} [Programming with C]
« on: February 25, 2017, 08:58:55 AM »
Advertisement
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


Engineering Forum

Consider the function find {int x, int y} [Programming with C]
« on: February 25, 2017, 08:58:55 AM »