arr[i] == *(arr + i) // values in two notations
&arr[i] == arr + i // addresses in two notations
Remember that adding one to a pointer, including an array name, actually adds a value equal to the size, in bytes, of the type to which the pointer points.
Pointer addition and array subscription are two equivalent ways of counting elements from the beginning of an array.
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten