May 2, 2007
CS107 Practice Midterm Exam
Normal Time: Wednesday, May 9
at 7:00 p.m. in Gates B01 and B03.
The exam is open-notes, open-book,
You should bring your own lecture notes, the course handouts, and any printouts of
assignment code you’ll want to consult during test time.
This practice exam is constructed from actual midterms I’ve given in previous quarters.
You will effectively
have as much time as you want, although we will need to pull the exams at 10:00 p.m., since that’s when the
room needs to be locked back up.
Those on campus who need to take the exam earlier in the day on Wednesday
may do so, provided you start sometime after 10:00 a.m.
SCPD students can take the exam on campus, or you can take it at home.
The exam will be posted as a normal
handout at 7:00 p.m. on Wednesday evening.
Download the exam, take it during some uninterrupted three-
hour block, and then fax your exam back in to me.
If you have questions during the exam, then you’re free to
telephone me on my cell.
Fax and cell phone numbers will be listed on the front page of the exam itself.
don’t need to take the exam at work, and you don’t need to be proctored.
Just make sure you fax the exam in by
5:00 p.m. on Thursday, May 10
The exam will focus on material like that covered on the first five assignments.
Be prepared for C/C++
coding questions requiring strong understanding of pointers, references, arrays, function pointers, and low-level
memory manipulation, as well as questions on code generation, function call and return, variable layout, stack
and heap implementation, and the compilation process as covered in Assignment 5.
In general, a good way to study for the coding questions is to take a problem for which you have a solution
(lecture or section example, homework problem, sample exam problem) and write out your solution under test-
This is much more valuable than a passive review of the problem and its solution where it is
too easy to conclude "ah yes, I would have done that" only to find yourself adrift during the real exam when
there is no provided solution to guide you!
This handout is intended to give you practice solving problems that are comparable in format and difficulty
to those which will appear on your midterm.
Understand that I am under no obligation to mimic this exam
when writing yours. That being said, any material covered in lecture or on an assignment is fair game.