Question: (C PROGRAMING PLEASE) 10. Give the function header(prototypes) for each of the following functions. a. Function hypotenuse that takes two double-precision floating-point arguments, side1 and

(C PROGRAMING PLEASE)

10. Give the function header(prototypes) for each of the following functions.

a. Function hypotenuse that takes two double-precision floating-point arguments, side1 and side2, and returns a double-precision floating-point result.

b. Function smallest that takes three integers, x, y, z, and returns an integer.

c. Function instructions that does not receive any arguments and does not return a value. [Note: Such functions are commonly used to display instructions to a user.]

d. Function intToFloat that takes an integer argument, number, and returns a floating- point result.

11. Find the error in each of the following program segments and correct the error.

a. #define SIZE 100;

b. int b[10] = { 0 }, i;

for (i = 0; i <= 10; ++i) {

b[i] = 1;

c. #define VALUE = 120;

d. int a[2][2] = { { 1, 2 }, { 3, 4 } }; a[1, 1] = 5;

12. Find the error (if any) in the following code and specify how to correct it or predict the output along with brief explanation:

a. void product(void) {

int a, b, c, result;

printf("%s", "Enter three integers: ")

scanf("%d%d%d", &a, &b, &c);

result = a * b * c;

printf("Result is %d", result);

return result; }

13. Compare Iteration with Recursion.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!