Please see the following code snippet:
int main()
{
int arr[] = { 0,3 , 4,28,1198};
for(int i=0;i<5;i++)
printf("\n arr[i] %u \n" , arr+i);
printf("\n *******************\n");
printf("%u ", &arr+1);
return 1;
}
When it is run, it outputs:
arr[i] 3219650892
arr[i] 3219650896
arr[i] 3219650900
arr[i] 3219650904
arr[i] 3219650908
*******************
3219650912
It seems that it is showing me the last element's address added with 1 more integer which seems to be strange. I feel it should have given me address of second element.
Can you help me understand this behavior?