Why function returns only the first value of the array?

I am trying to understand functions in Arduino. Here I wanted to print arrays maximum value, but I do not understand what is wrong, it returns only the first value. Why?

float readings[] = {2.2, 5.6, 7.64, 3.2, 1.6, 7.0, 24.36, 254.9};

void setup() {
  Serial.begin(9600);

  Serial.println(arrayMax(readings));
}

void loop() {}

float arrayMax(float array[]) {
  float maxValue = array[0];
  for (uint8_t i = 1; i < sizeof(array) / sizeof(array[0]); i++) {
    if (maxValue < array[i]) {
      maxValue = array[i];
    }
  }
  return maxValue;
}

There is no methode to access the array bounds for the passed array, you should pass it a a separate parameter.

float readings[] = {2.2, 5.6, 7.64, 3.2, 1.6, 7.0, 24.36, 254.9};

void setup() {
  Serial.begin(115200);
  Serial.println(arrayMax(readings, 8));
}

void loop() {}

float arrayMax(float array[], uint8_t arrayLen) {
  float maxValue = array[0];
  for (uint8_t i = 1; i < arrayLen; i++) {
    if (maxValue < array[i]) {
      maxValue = array[i];
    }
  }
  return maxValue;
}

Ugh. It was a silly question. Thank you very much!

Ugh. It was a silly question.

No, it wasn't. It was a reasonable question, based on a misunderstanding of what is passed to a function.