Q:

When we subscript an array, we are really subscripting a pointer to an element in that array

0

When we subscript an array, we are really subscripting a pointer to an element in that array.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

int i = ia[2]; // ia is converted to a pointer to the first element in ia
// ia[2] fetches the element to which (ia + 2) points
int *p = ia; // p points to the first element in ia
i = *(p + 2); // equivalent to i = ia[2]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now