Question: Hello, Please complete only problems 2 and 5 and show output for both. Thank you 2. Write a C function named liquid() that is to

Hello, Please complete only problems 2 and 5 and show output for both. Thank you

Hello, Please complete only problems 2 and 5 and show output for

2. Write a C function named liquid() that is to accept an integer numbe r and the addresses of the variables gallons, quarts, pints, and cups. The passed resents the total number of cups, and the function is to determine the number of lons, quarts, pints, and cups in the passed valuc. Using the passed addresses, the should directly alter the respective variables in the calling function. Use the rel of 2 cups to a pint, 4 cups to a quart, and 16 cups to a gallon. 3. Rewrite the findMax () function in Program 6.2 so that the variable max is decl ared main() and the maximum value of the two passed numbers is written directlyto max Hint: The address of max will also have to be passed to findMax ().) . Modify Program 7.10 to accept a character parameter named sortorder. If sort is an a, swap () should exchange values only if the first value is larger than the seco value; that is, the function should return the values in ascending order (smallest nun first, largest number second). For any other value, the function should return the val in descending order (largest number first, smallest number second). Write a C function named yrCalc) that accepts a longer integer representing the total number of days from the date 1/1/1900 and the addresses of the variables year month, and day. The function is to calculate the current year, month, and day for given number of days and write these values directly in the respective variables using t assed addresses. For this problem assume that cach year has 365 days and each monih has 30 days

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!