An array parameter and a length parameter behave differently

Trace the caller and callee separately. Give the exact output, list the changed elements, and explain why setting n=0 does not change the caller’s n. If adjust must work with arrays of different lengths, explain why it needs the explicit n argument rather than calculating the element count with sizeof a inside the function. Assume each caller passes a nonnegative length no larger than its actual array.

#include <stdio.h>
static void adjust(int a[], int n) {
    for (int i = 1; i < n; i += 2) {
        a[i] += 10;
    }
    n = 0;
    printf("inside n=%d\n", n);
}
int main(void) {
    int a[5] = {2, 4, 6, 8, 10};
    int n = 5;
    adjust(a, n);
    printf("outside n=%d\n", n);
    for (int i = 0; i < n; ++i) {
        printf("%s%d", i == 0 ? "" : " ", a[i]);
    }
    putchar('\n');
    return 0;
}

