Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups. The passed integer represents the total number of cups, and the function is to determine the number of gallons, quarts, pints, and cups in the passed value. Using the passed addresses, the function should directly alter the respective variables in the calling function. Use the relationships of 2 cups to a pint, 4 cups to a quart, and 16 cups to a gallon.
Include this function in a program, printing the results after the function has run.
If the user enters 27 cups, the output should be:
The solution writes a C function named liquid() that is to accept an integer number and address the variables in gallons, quarts, pints and cups.