Midterm Topics
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.
-
Variables
Know the four properties of a variable, name, type, location and contents.
-
Functions
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).
-
Arrays
Definition, declaration, use ( how to get and store values), rules (all
the elements are the same size). counting (starts at 0).
-
Strings
Array of characters, Nul('\0') character at the end, Nul is not NULL.
-
Pointers
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.
How do you get the address of a variable?
Know how to convert from array notation a[1] to pointer notation
*(a+1).
Know the difference between the types of pointers and the types of the
things they point at.
char * p; // p is a character pointer, pointer to character
char x; // x is a character
p = &x; // p points at x;
cout << *p; // *p i of type character
-
New and Delete
What do they do, how do you use them?
-
Expressions
Assignment is an expression.
What is it's value?
What is true and what is false?