Exams

Please make note of our exam dates in the Course Info handout because we do not allow make-up exams (other than for OAE or student athletics).


Midterm Exam

Exam and Answer Key:

If you are an SCPD student who took the exam remotely with a proctor, you received a different midterm exam that does not exactly match the one on this page. Go to the SCPD page to download a copy of that exam and its answer key.

Score Stats, Curve, and Other Information:

* Stats below are curved scores, and they do reflect our curve as explained below.

pts %
MEDIAN 52 80.0%
MEAN 52.0 80.0%
MAX 65 100%
STDEV 7.55 11.6%

Curve?: +5 points out of 65. To increase the averages up to our targets, these points will be added to everyone's score, up to a maximum of 65/65 (100%). None. We are content with the scores as given, so there will not be a curve on the midterm exam. Remember that all students' grades are fit to a distribution at the end of the quarter, so your grade may still be higher than the minimum guarantees listed on the course information handout.

Low Grades: Another topic some students ask about is: If their score was lower than they hoped, how much effect will that have on their grade, or what are their options, etc.? Most of the information to answer this can be found on this web site. The course info sheet lists the relative grading weight of homework vs. midterm vs. final exam, so you can use that to compute the rough effect on your grade of a particular midterm score. Also look at our FAQ page for info about pass/fail grading options, drop dates, and other information.

Picking up your exam: We do not return the paper exams, but you can see the digital scan of your exam in the GradeScope system once exam scores are published. You should log in (or create account as needed) using your Stanford email account.

Regrade Policy:

We work hard to grade consistently and correctly, but sometimes we make mistakes in grading. If you disagree with the grading of your exam, such as if you think your solution actually does work, or that your solution is more nearly correct than it was given credit for, the procedure for regrades is the following:

If your complaint is about the correctness of your solution to a programming question, you must download our Qt Creator code project, which will contain runnable testers for the midterm problems. Type your code into the project .cpp file, fixing any trivial syntax problems. Run it for yourself and see how nearly correct your solution is.

If after running the code files you still think your grade is incorrect, fill out this form. We will not accept any exam for a regrade unless the form is filled out in entirety, and we will not re-evaluate grading of the correctess of any programming questions without a typed copy of your solution being shown to us first.

Also note: When you submit an exam for a regrade, we will regrade your entire exam. If we notice anywhere that you were mistakenly given too many points, we will also correct this. So it is possible (though less likely) that a regrade request will result in you receiving a lower mark than what you started with.

All midterm regrade requests (other than simple score addition errors) must be submitted to the instructor no later than Week8 Fri, at 11:59pm.

Reference Sheet:

  • icon syntax reference sheet (will be given out attached to your exam as a reference; bring your textbook to reference any other C++ syntax/libraries)

Practice Exams:

Sample midterm exam(s) posted here are intended to be very similar to the actual midterm. The number of problems and type of problems on the actual exam will be much like what is seen on these practice exams. You can test your answer by typing it into Qt Creator or CodeStepByStep.

Rules and Information:

  • The exam is to be completed individually and without any assistance from a partner or other students.
  • The exam is open-book for the Programming Abstractions in C++ textbook, or any other relevant textbooks you want to bring. You can bring the current edition of the book, or the previous ring-bound "course reader" edition, but not a digital copy and not a printout of the book on loose paper.
  • The exam is closed-notes and closed for all other resources. You may not bring or use any other printed materials such as handouts, slides, or practice exams. (A "syntax reference sheet" of necessary syntax will be given to you at the exam.) You may not use any computing devices of any kind including calculators, cell phones, music players, iPad/Kindles, or other electronic devices. Please do not have any of these devices out nor use any of them during the exam.
  • Unless a question specifically mentions otherwise, your code you write will be graded purely on external correctness (proper behavior and output) and not on internal correctness (style). So, for example, redundancy or lack of comments will not reduce your score.
  • You don't need to write any #include statements in your exam code.
  • Please do not abbreviate any code on the exam. Abbreviated code will be ignored during grading.
  • Unless otherwise specified, it is fine to write helper functions to implement the required behavior.
  • Please be quiet during the exam. If you have a question or need, please quietly exit the room and a nearby SL or TA will assist you.
  • Any corrections or clarifications to the exam will be written at the front of the room.
  • Please follow the Stanford Honor Code during the exam. Work on the exam alone and submit only your own work. Please also take action to prevent any inappropriate activity conducted by others, such as speaking to the person and asking them to stop, or reporting the activity to the instructor.
  • When you have finished the exam, please leave the room quietly and bring your exam to the instructor and SLs.

Topics to Study:

The actual midterm exam will have roughly 8-10 total problems. Those problems will be selected from the following categories. For each category, you may be asked to read code (look at a piece of existing code and answer questions about it, such as writing its output), and/or write code (write a piece of code such as a function or short program that solves a problem about that topic).

  • C++ basics: console input/output; strings, streams (file I/O), functions; passing parameters by value and by reference; return
  • using ADTs: the collections from the Stanford C++ library, such as Vector, Grid, Stack, Queue, Set, Map, HashSet, HashMap, or Lexicon; understanding tradeoffs between various data structures
  • algorithm analysis / Big-Oh: look at a given piece of code and answer questions about its runtime complexity, and/or write a piece of code that solves a problem within a given Big-Oh limit
  • recursion: look at a piece of recursive code and write its output, and/or write a function that uses recursion to solve a problem
  • backtracking: write a function that uses recursive backtracking to solve a problem
  • pointers: write lines of code that use pointers, and/or look at a piece of pointer code and answer questions about it (including short chains of linked nodes)
  • The following topics are guaranteed NOT to be required to solve any problem on the midterm:
    • complex output formatting with the iomanip library (e.g. setw, setprecision)
    • searching and sorting algorithms
    • drawing fractals
    • the GWindow class or any other code related to graphical user interfaces (GUIs)
    • arrays
    • priority queues and heaps
    • creating your own classes of objects
    • writing C++ template classes
    • operator overloading
    • anything else not explicitly covered in lecture or homework
    • any material that is only covered in the "Overflow" slides at the end of various lecture slide decks
    • any material covered past the end of week 5 of the course (material from weeks 1-5 inclusive will be tested on the exam)

Here is a handout created by a past CS 106B instructor with her advice about how to study for, and take, a CS 106B exam. Note that not all of the information and policies in this handout are correct for the current quarter; for example, in Julie's quarter the exam was open-notes, but the exam this quarter is not.

No other exam information has been posted yet. There will be an announcement on the main course web page when exam information is posted.

This document and its content are copyright © Marty Stepp and Victoria Kirst, 2016. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the authors' expressed written permission.