Computer Systems Organization I - Prof. Grishman
Quiz #2 Review Sheet
The second quiz of the course will be given on Wednesday, November 17th. It
worth 15 points towards your final grade.
You will have all period for the quiz. It is an open book quiz
... you may bring your textbook and any other written
materials. You may not exchange materials with anyone else during
The quiz will primarily cover C programming, and in particular the
aspects of C which are different from Java, and which we have
emphasized over the last 3 weeks:
- character arrays for strings; zero ('\0') terminator
- function arguments: values vs. addresses
- using pointers for returning values from functions [P&P, pp.
- using pointers for array access [Lecture 17
- arrays of pointers [Lecture 19 notes]
- memory allocation (malloc and
free) [P&P, pp.
- C I/O: scanf and
printf; getchar and putchar; EOF [P&P, pp.
- structures [P&P, pp. 497-504; Lecture 19]
We may ask about static and
automatic variables, and about static allocation vs. allocation on the
stack or heap [Lecture 18 notes;
P&P pp. 328-330, 504-508]
We may ask about programs converting from ASCII strings (decimal, hex)
to binary and back.
We will probably ask about overflow again; an overflow
review sheet is on the back.
Finally, to test your long-term memory, we may ask about how a C
statement would be translated into LC-3 assembler.
Doing the homework and reading the
lecture notes and book are the best preparation for the quiz.