whats the difference in between &p[i] and p+i
here p is a pointer to a 1D integer array
here actually both are same but when pass them to a function ( with pointer to int argument ) its giving different results.
Pointers - passing an address to a function
if p is one D array then it is pointer pointing to first element of array
&p[i] it wil give you the address of p[i]
p+i it will move pointer p to i unit ahead and then give the address of p[i] now your p is at p[i] so array start from here.
how will i pass the address of i th position of p from one function to other, will it be &p[i] or p+i ? in both cases its giving different results