If I define an array arr[]
and define a pointer to it:
int *p=arr;
If the value of arr
(in terms of address) is 0x1234
. What will be the value of p
? Will it be the same?
Yes. The value is the same. To check this, just try
printf("arr=%p p=%p\n", arr, p);