CS137 Textbook
This content was thoughtfully created and tailored for CS137 — Programming Principles, for Software Engineering students at the University of Waterloo.
It features a collection of uniquely designed practice problems and in-depth explanations aimed at supporting students in mastering course concepts. Widely received as a valuable learning resource, it has helped students deepen their understanding, reinforce key ideas, and perform confidently in the course.
All notes are mine. I asked an AI tool to handle formatting only. I have not gone through the whole thing to double-check it kept its hands off the content, so treat any weirdness as a formatting artifact rather than something I wrote.
This Textbook isn't a substitute for attending lectures. Class discussion often expands on topics based on student questions, and I add commentary, extra examples, and explanations in the moment that don't make it into the written version.
Last updated: June 2026
- Ch. 01Introduction to C↗
- Ch. 02Making Decisions↗
- Ch. 03Loops↗
- Ch. 04Functions, Modules and Compiling↗
- Ch. 05Recursion↗
- Ch. 06Arrays and Intro to Pointers↗
- Ch. 07Floating Numbers, Math Library, Polynomials and Root Finding↗
- Ch. 08Structures↗
- Ch. 09Pointers, Memory Allocation, Arrays and Vectors↗
- Ch. 10Characters and Strings↗
- Ch. 11Big-Oh Notation↗
- Ch. 12Searching and Sorting Algorithms↗
- Ch. 13Linked Lists↗
- NewFinal Exam Practice problems↗