write a function int* generate_rand (int length, intMAX_ARRAY) that gets an integer as input and generates a dynamic array with the same number of elements, fills the array with random values between 0 and MAX_ARRAY and returns a pointer to this array.
What part are you having trouble with? Please show that you've made an effort to solve this yourself, otherwise most of us will think you're just looking for someone to do it for you.