Answer:
void divide(int numerator, int denominator, int *quotient, int *remainder)
{
*quotient = (numerator / denominator);
*remainder = numerator % denominator;
}
Step-by-step explanation:
this exercise is to learn the syntax of passing by pointers. Pointer arguments are special. This is because, conventional arguments, when passed, make a copy of the argument received and manipulate that copy. Afterwards, that copy is deleted. Pointer arguments are used when the original argument, in this case the quotient and the remainder, need to be altered in the program. How it works is, when passing by pointer, the computer goes inside the memory, finds the location of the pointer, and edits it there, IT DOES NOT MAKE A COPY IN THIS CASE.