View the step-by-step solution to:

There are two parts. Write code for a function that receives two parameters (a,and b) by value and has two more parameters (c and d) by reference....

There are two parts.

1. Write code for a function that receives two parameters (a,and b) by value and has two more parameters (c and d) by reference. All parameters are double.

The function works by assigning c to (a/b) and assigning d to (a*b).

From main, use scanf to get two numbers, then call the function, and then display both returned values to the output in a printf statement.

2. After part 1 is completed, write code to get 20 integer numbers from the user. The code then displays how many of those numbers are above the numbers average. To get proper credit you must follow these steps:

a. write a for loop to fill the array with numbers from the user. Use a pointer

b. use an index to pass through all array elements to calculate the average in another loop.

c. write a function, then pass the array, its size, and the average to the function. The function returns the count of the number of elements that are above the average.

Top Answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online