Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Circle the letter of an appropriate prototy pe statement for this function fr

ID: 3596029 • Letter: 2

Question

2. Circle the letter of an appropriate prototy pe statement for this function from the following possible choices: a. double computePay (h,r); b. int computePay (h, r, p); c. void computePay (double h, double r); d. int computePay (double a, double b, int c ); e. double computePay (double a, double b); 3. Write the C statements that could be added to the main function to declare two variables and assign to them the values of some number of hours worked and the base hourly pay rate for an individual. Call the computePay function, passing the variables as arguments. (Walk through your function code and make sure it works correctly for 42 hours and 25 hours, as well as a value that would be considered an error.)

Explanation / Answer

2) e Option is correct double computePay(double a,double b)

Since this function will return the salary.

3) double computePay(double a,double b)

{

return a*b;

}

when 42 and pay is 100 then result is 4200

The same with 25 and 100 which is 2500