Question: Please answer in C programming. We will be using pointers, declaring them, making them point to another variable, change the content of the referent, make
Please answer in C programming. We will be using pointers, declaring them, making them point to another variable, change the content of the referent, make the pointer point to something else, and write and use a function using pass by reference.
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. Please 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
