This is a list of the topics we have covered so far.
The midterm questions can come from any of these.
Read over the notes and review the readings mentioned in them (if any).
Study the example code.
Know the four properties of a variable, name, type, location and contents.
Functions can be used wherever a variable of the return type can be used.
Know the difference between pass by value and pass by reference (reference parameters).
Definition, declaration, use ( how to get and store values), rules (all
the elements are the same size). counting (starts at 0).
Array of characters, Nul ('\0') character at the end, Nul is not NULL,
Declaration, use, dereferencing, the name of an array is a pointer to an
array, pointer arithmetic, how to use to move along an array, know what
the line while(*dest++=*src++) ; means and how it works.
There is some information in sections 4.0-4,2 in the text.
Declaration and use, both the name.field and name->field
New and Delete
What do they do, how do you use them?
Know the different operators ( <, >, >+, <=, != ) know the
logical operators ( !, &&, || ) How to combine them.
What is true and what is false?
- Linked Lists
Definitions. An empty list is a list. Each node contains the
location of the next one.
What is a doubly-linked list?
Always check for NULL pointers.
Understand the algorithms in the code we used, don't just memorize
There is some information in Chapter 5.
The book uses a different implementation than we do, so look for
generalizations and look at our example code