Functions and Code Segment
1a) (Function) Represent the mathematical operation: max (x, y, w, z) as a C function. This is, write a function that is
passed 4 integer values that returns the largest value of those four parameters. For example, max (5, 2, 4, 1) would
return 5 since it is the largest value of the four parameters.
1b) (Code Segment) Rewrite the mathematical operation: max (x, y, w, z) as a single statement using the conditional expression
operator. For example, max (x, y) would be:
max = (x > y) ? x : y;
Hint: You will have more than one conditional expression operator (?) in your answer, and it would
help to use boolean logic operations that were covered in Week 3.
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


