Exam 2 study tips

This reference sheet will be provided for you. On this exam, you should be able to:
  1. Trace execution of a C program with various forms of preprocessor macro.
  2. Convert between array and pointer notation.
  3. Evaluate various pointer expressions (dereferences, address of, mixed with array syntax, etc.).
  4. Trace a pointer-heavy C program to determine its output, including function pointers.
  5. Identify the legality of various assignment expressions dealing with pointers.
  6. Understand the difference between a 2D character matrix and a ragged array of strings.
  7. Understand and be able to implement the common functions of string.h. By "common" I mean things like strlen, not more esoteric ones like strcspn.
  8. Be able to trace a problem using nested structs to store complex data.
  9. If given a Makefile, be able to draw the dependency graph, identify default targets, and predict commands that make will execute.
  10. Identify the memory region in any given variable is allocated (static/stack/heap).
  11. Make use of the fundamental dynamic memory functions (malloc, calloc, realloc, free)
  12. Identify and correct memory leaks
  13. Manipulate bits, such as identifying which bits in an integer are "set" (i.e. equal to 1)

Things to practice