Exam 2 study tips
This reference sheet will be provided for you. On this exam, you should be able to:
- Trace execution of a C program with various forms of preprocessor macro.
- Convert between array and pointer notation.
- Evaluate various pointer expressions (dereferences, address of, mixed with array syntax, etc.).
- Trace a pointer-heavy C program to determine its output, including function pointers.
- Identify the legality of various assignment expressions dealing with pointers.
- Understand the difference between a 2D character matrix and a ragged array of strings.
- 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.
- Be able to trace a problem using nested structs to store complex data.
- If given a Makefile, be able to draw the dependency graph, identify default targets, and predict commands that make will execute.
- Identify the memory region in any given variable is allocated (static/stack/heap).
- Make use of the fundamental dynamic memory functions (malloc, calloc, realloc, free)
- Identify and correct memory leaks
- Manipulate bits, such as identifying which bits in an integer are "set" (i.e. equal to 1)
Things to practice