an application program interface (api) provides a procedure max, which returns the greater of its two…

an application program interface (api) provides a procedure max, which returns the greater of its two integer arguments. a programmer would like to find the greatest of three integer values a, b, and c. 20 mark for review which of the following expressions will produce the desired result in every case? a max (max (a, b), c) b max (a, b) - max (b, c) c max (a, b) + max (b, c) - max (a, c) d (max (a, b) + max (b, c)) / 2
Answer
Answer:
A. Max (Max (a, b), c)
Explanation:
Step1: Find max of a and b
Max(a, b) finds the greater of a and b.
Step2: Find max among result and c
Max(Max(a, b), c) then finds the greater between the result of Max(a, b) and c, which gives the greatest of a, b, and c.