while passing array a to *p , so why p[i] is not address instead of value of array
Home work question 1,sum of array elements uisng function
@n.nishchaya2000
Hello nischaya,
when we pass array then base address of array is passed.
so here in ur case p is having base address of array a.
now p[i] is equivalent to *(p+i) where p+i is giving u address of ith index and putting * over it is giving value .
i hope this clears ur doubt
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.