|
Computer Science & Software Engineering C Programming (CITS1210) - Lecture 8 |
|
||||||
A slow introduction to pointers in CThe ISO-C99 programming language has a very powerful feature, which we'll casually term "pointers in C" for now.
The primary role of pointers - to allow a program (at run-time) to access its own memory - sounds like a useful feature, but is often described as a very dangerous feature. There is much written about the power and expressiveness of C's pointers, and much (more recently) written about Java's lack of pointers. More precisely, Java does have pointers, termed references, but the references to Java's objects are so consistently and carefully constrained at both compile and run-time, that very little can go wrong. |
|
C Programming (CITS1210), Lecture 8, p1, 25th September 2008. |