Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Parameter Arithmetic & <strong>Arrays</strong><br />
S int v[5]; int *vPtr = v; (or = &v[0];)<br />
S v[3] == * (vPtr + 3) == * (v + 3) == vPtr[3]<br />
S vPtr + 3 is the same as &v[3]<br />
S Array names cannot be modified in arithmetic expressions<br />
because they are constant.<br />
61