difference between *(arr+i) and (arr+i)
Answers
Answered by
8
So here's what I do to solve such questions. Instead of calling '*' a dereferencing operator I call it an "value at address" operator.
writing name of an array gives us the base address of an array. So writing *(arr+1)+1 is actually value at address(arr + 1) + 1 Lets assume that arr is an integer array and starts at location 1000. That being said our equation resolves to value at address(1000 + 1) + 1
writing name of an array gives us the base address of an array. So writing *(arr+1)+1 is actually value at address(arr + 1) + 1 Lets assume that arr is an integer array and starts at location 1000. That being said our equation resolves to value at address(1000 + 1) + 1
Answered by
16
Answer:
Explanation:
(arr+i) = address of that array with i as index value
*(arr+i) = the value at that address
Similar questions
English,
6 months ago
Social Sciences,
6 months ago
Geography,
1 year ago
Math,
1 year ago
English,
1 year ago