Joined July 2013
·
Miles Rout
New Zealand
·
Posted to
The Concept of Pointers
over 1 year
ago
I personally think the best way to explain pointers is like this (note that I've only ever explained this to people that have learnt Python first, so I'll use Python terms despite them lists and arrays being different things in real life):
A pointer is a memory address. What does that mean? Imagine memory as a giant list (i.e. array in non-Python terms) of bytes, of fixed length. Now imagine that a point is a number being used as an index into that list.
Of course C doesn't actually have pass-by-reference - you pass pointers by value instead.