Calculate min, max, mean and median out of array
I see a number of things that may help you improve your program.

Don't violate const

The calculate_median routine takes a const array, makes a duplicate and then sorts the original!  I think you meant to sort the duplicated array instead.

Understand pointers

In main there's this line:

int numbers[] = { 1,7,3,4,5,6,7,8,9 }; // 9 elements  
// other stuff
struct Result result = calculate_values(&amp;numbers, len);


The problem is that &amp;numbers is not really what you want.  With an array, the name is already effectively a pointer to the array, so you don't need &amp; at the front in this context.

Don't leak memory

The intdup function allocates and copies the passed array, but then that memory is never freed.  I'd suggest freeing the memory again as soon as the function is done with the duplicate array.

Think about naming

The variables len and mean are good because they suggest the significance of these variables in the context of the program.  However, result and numbers are a little generic.  I'd suggest perhaps summaryData and testArray as possible replacement names.

Eliminate unused variables

The tmp variable within calculate_median is never used.  Since unused variables are a sign of poor code quality, you should seek to eliminate them.  Your compiler is probably smart enough to warn you about such things if you know how to ask it to do so.

Think about efficiency

This suggestion is last for a reason.  It's important to have a correct program first, and then optimize for space/time efficiency.  In this case, a productive approach is suggested by the wording of the question itself:


  Write a function that takes an array of 'ints' as its input and finds the smallest and largest elements. It should also compute the median and mean. Use a struct holding the result as the return value.


It says to write a function and that's a good strategy for this.  Since you're sorting the array anyway to get the median, you could also use the sorted array to easily get the min and max values from that sorted array.  The mean could be calculated the same way you're currently doing it, but this would reduce the number of times that the array would need to be traversed.