void main() {
int arr[] = {1,2,3}
}
void main(int* a,int n) {
for(int i=0; i<n;i++)
a++;
int size = (a-(&a[0]))/4;. //calculate size of array?
}
If for example the first array element is in address 4, after the loop the arr pointer will point to address 16, can I calculate the size of the array doing (16-4)/4, by casting int or somehow? Thanks.
I tried the part of the code above.