#include <stdio.h>

void prn_sizeof (int ia[]);
void prn_length (int ia[]);
void prn_correct (int *ia, size_t sz);

int main (void)
{
    int array[] = { 0, 1, 2, 3, 4, 5, 6 };

    printf ("\n sizeof of array    : %lu (bytes)\n", sizeof array);
    prn_sizeof (array);

    printf (" length of array    : %lu  (elements)\n", sizeof array / sizeof *array);
    prn_length (array);
    prn_correct (array, sizeof array / sizeof *array);

    return 0;
}

void prn_sizeof (int ia[]) {
    printf (" sizeof of argument : %lu  (pointer size)\n\n", sizeof ia);
}

void prn_length (int ia[]) {
    printf (" length of argument : %lu  (wrong!)\n", sizeof ia / sizeof ia[0]);
}

void prn_correct (int *ia, size_t sz) {
    printf (" real argument len  : %zu  (not: %lu)\n\n", sz, sizeof ia/sizeof *ia);
}