Exercises and Discussion Topics

  1. If you are familiar with C++ or Java explain how it is possible to minimize (in C++) or avoid (in Java) the use of pointers.
  2. How does a C pointer differ from a memory address? How does that affect your understanding of code? Which tools take advantage of the difference?
  3. How can a program using structures to specify a memory layout ensure that they are correctly allocated?
  4. How would you translate a program using unions into Java?