Written by Nick Troccoli, based on documents by Julie Zelenski, Marty Stepp and others
Past Midterm Logistics Information
The following is abridged information that was provided in past quarters as guidelines for the midterm exam.
The exams are designed to assess your mastery of the course learning objectives, with a particular emphasis on material that was prominent in the lectures, assignments and labs.
The exam is closed-book. You may bring a double-sided US-Letter-sized (8.5"x11") page of your own prepared notes. The exam will include a reference sheet of essential details such as prototypes for standard library functions (e.g.,
You will take your exam electronically, using our custom BlueBook exam software, which you can run on your computer if you have one. If you do not have access to a laptop for the exam that can run BlueBook, please contact the course staff. You cannot access notes, run other applications, use the Internet, nor use any other electronic devices during the exam.
The midterm is intended to assess your understanding of the content covered in the first half of the course. The coverage is through lab4 and assign4 but not beyond (i.e., midterm will cover neither floating point nor assembly). The priority is on material that figured prominently in the assignments, labs, lecture, and reading (this list is in order of decreasing emphasis).
We highly recommend revisiting the labs and assignments. Each of them contain post-task self-check questions at the end that you can use to review. The K&R and B&O textbooks also contain many exercises if you want additional problems to work.
The Honor Code: the exam is to be completed individually and without any assistance from a partner or other students. Follow the Stanford Honor Code (see link on main course homepage) during the exam: submit only your own work, do not use unpermitted aids on the exam (see below for permitted aids), and say something to the instructors or students in question to prevent any inappropriate activity conducted by others surrounding the exam.
Permitted Materials: During the exam, you may use/reference:
a double-sided US-Letter-sized (8.5"x11") page of your own prepared notes.
a provided reference page of essential details such as prototypes for standard library functions (e.g.,
malloc). This is included in the BlueBook exam.
You are not permitted to use any other materials, such as printouts (notes, slides, code, practice exams, etc.), other textbooks, or electronic devices (iPads, Kindles, calculators, music players, etc.).
Grading: For coding questions, the majority of the points are typically focused on the correctness of the code. However, there may be deductions for code that is roundabout/awkward/inefficient when more appropriate alternatives exist. We will reward the simple, direct approach for its good design decisions and such code will likely have fewer correctness issues, so the choice of appropriate design can have a large impact. For example, we expect you to leverage appropriate features from the standard libraries; re-implementing that functionality wastes your valuable time and introduces opportunity for error.
Note that certain problems may have certain constraints (such as only using certain material, etc.) that you must follow to earn full credit. We reserve the right to deduct points for extremely inelegant or inefficient code that dodges the spirit of the problem.
You are not required to write
#includestatements on the exam. Please do not abbreviate any code on the exam (such as writing "x2" next to code to copy it twice). Abbreviated code will not be graded.
Pseudo-code (writing English sentences and phrases instead of code) will typically earn little to no points. For example, writing "In this part of the code, I want to open the file and read each line and print it" will not earn any points.
You should include your answer, as well as any scratchwork, in the text area for each problem. An answer to a problem not in the designated answer pages for that problem will not receive any credit.
Unless otherwise specified, it is fine to write helper functions to implement the required behavior.
Exam Reference Sheet: