2 ms·
When teaching, rather than using a special name like "pointer", wouldn't it be better to simply explain that it's a variable that holds a memory address? Once a
by Myrmornis 10y ago
When teaching, rather than using a special name like "pointer", wouldn't it be better to simply explain that it's a variable that holds a memory address? Once a student (e.g. who only knows a high-level language) understands that they now have to think about memory explicitly, then the behavior of such a variable will become obvious. AFAIU there are only two special features of pointers: the dereference operation and the additive arithmetic which increments in strides according to their type.