This is the problem I've been assigned and have yet to figure out where I'm going wrong.
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.
This is what I have so far but I can't get the correct output, please let me know where i went wrong.
void liquid(int ,int*,int*,int*,int*);
int num1=0, cups, pints, quarts, gallons;
printf("Enter the number of cups:");
liquid(num1, &cups, &pints, &quarts, &gallons);
void liquid(int x, int *gallons, int *quarts, int *pints, int *cups)
printf("The number of gallons is %d\n",&gallons);
printf("The number of quarts is %d\n",&quarts);
printf("The number of pints is %d\n",&pints);
printf("The number of cups is %d\n",&cups);