23.03.2013 Views

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Parameter Arithmetic & <strong>Arrays</strong><br />

S int v[5]; int *vPtr = v; (or = &v[0];)<br />

location: x5000 x5004 x5008 x500c x5010<br />

vPtr<br />

v[0] v[1] v[2] v[3] v[4]<br />

S vPtr += 2; //goes from x5000 to ?<br />

59<br />

like 5012 like 5016

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!