Is there some way to pass an array as an object (as opposed to passing it as a pointer to its first element) and without using a structure? I want to be able to iterate through the array like this:
int get_max(int a[]){
int max = 0;
for(int i = 0; i < sizeof(a)/sizeof(a[0]); i++){
if (a[i] > max) max = a[i];
}
return max;
}