Mohd Saq
Mohd Saq

Reputation: 1

Address of the array name pointer and the first element of the array

Is the address of the first element of the array and the address of the array name pointer is same in C programming?

And what if we create a pointer(p) to the first element(a[0]) of the array(a[5]) then the address of the pointer(p) , first element(a[0]) and the default pointer(a) will be same? `

As my conclusion and research the address of the first element(a[0]) and the address of the array name pointer(a) is same but the pointer(p) which I have created holds the address value of the first element of the array(a[5]) but its address is different.

Upvotes: 0

Views: 39

Answers (0)

Related Questions