I'm getting warning: assignment from incompatible pointer type [enabled by default]
when i compile the following code:
int main() {
int (*aptr) [5] = NULL;
int arr[5] = {1,2,3,4,5};
aptr = &arr[0];
printf("aptr = %p\n arr = %p\n", aptr, &arr[0]);
return 0;
}
I'm getting the correct output:
aptr = 0xbfcc2c64
arr = 0xbfcc2c64
But why am I getting the warning of incompatible pointer type?