hey i just did a small work to find max and min number from an array
how can i change the function call to call the pointer and not the array
like int *p;
p=array[n]
max(*p)?
how can i change the function call to call the pointer and not the array
Well, it should be obvious that you'll need to pass the pointer as an int*:
void max(int* array)
If you were writing this as a reusable library function, I'd say you also need to pass the size of the array, i.e. the number of elements in the array, as the function would have no way of knowing how many elements are in the array. However, it seems you've already writing the function to assume that the size of the array is 4, so you can keep that assumption if it's valid.
I would say that you should use a single constant for the size of the array, rather than using a magic number everywhere, so: