Originally posted by: FishTaco
trek, this looks like homework so I won't give you code.
What you want is to declare the parameter of your function to take a pointer to a pointer to an int.
In the function you'll then store the pointer returned by malloc by dereferencing the pointer to a pointer to an int.
To call the function, you'll pass it the address of a pointer to an int.