My main goal is to find out the number of elements in an array. In my program I have something like this:
Code:
int arr1[] = {3,4,6,7};

printf("The array has %d elements.\n", sizeof(arr1)/sizeof(int));
Which works fine. The problem is when I pass the array to a function of mine and use the same print statement. the result is always 1;

the function looks something like this:
Code:
int nth(int[], int[]);


int nth(int arr1[], int arr2[]{
    printf("The array has %d elements.\n", sizeof(arr1)/sizeof(int));

    return arr1[0];
}
What am I missing here? Thanks...