Before class · do this at home
Watch, read, then come
- Review one week per day: re-read the week page, redo the lab from a blank file, and try the CS50 problem set of that week without looking at your old code.
- Practice on paper. The exam is written: you will trace code, draw memory, write short C functions and explain trade-offs, without a compiler.
- Bring: pen, student ID. No notes, no devices.
Learning objectives
By the end of this week you can:
- 1 Convert between binary, decimal and hexadecimal; explain ASCII and RGB.
- 2 Trace a C program with loops, functions, arrays and strings and give its output.
- 3 Write short C functions from a specification (validation loops, string processing, searching).
- 4 Compare algorithms with Big O and trace selection, bubble and merge sort.
- 5 Draw memory for pointer code, explain swap, malloc/free, and identify leaks and segfaults.
- 6 Implement linked-list operations and explain hash tables and their trade-offs.
Format
- Duration and room: announced by the faculty and posted under announcements.
- Roughly: 30% short answers (representation, definitions, Big O), 40% code tracing and memory diagrams, 30% writing C functions.
- Everything on this site from week 1 to week 7 is fair game; the lab programs are the best predictor of the coding questions.
How to review
- One page per week. Write the key ideas of each week on one sheet, by hand. If it does not fit, you do not yet know what matters.
- Redo, do not reread. Open a blank file and rewrite Lab 2’s calculator, Lab 3’s cipher, Lab 4’s binary search, Lab 5’s swap and Lab 6’s linked list from memory. Compile them. That is the exam, with a compiler.
- Trace on paper. Take three short programs from the CS50 notes and write their output without running them. Then run them.
- Explain to someone. Pointers, hash tables and Big O to a friend who is not in the course. If they get it, so do you.
No lab this week
The lab slot is used for the exam or for questions, depending on the faculty’s schedule. Use the time you save to push a commit to your project.
Go deeper
- Last year's midterms (A and B) with solution guides · On the previous course site. The format is the same; the questions are not.
- CS50x problem sets 1–5 · The best written practice there is.
Tags:midtermexamreview