Non-Graded Exercises/Examples

This page provides exercises and examples for you to try. Since you'll learn the most in this class by doing rather than watching, I urge you to try as many of these as possible. As an incentive, each exam will have some questions that are isomorphic (i.e., same form, but possibly different variable names) to questions from this page.


There are typos in some of the programming examples from the textbook, so don't panic if your program does not work. Check your course notes, or ask us in office hours, if you're stuck.


Online Quizzes

The online quizzes are hosted on Connect. These quizzes are multiple-choice questions that you can take as many times as you like. They are not part of your formal assessment; however, they are a great source for practicing for exams. As an incentive for doing these practice questions, I guarantee that at each exam will have at least one question that is isomorphic (i.e., same form, but possibly different details) to one of these questions.

Practice questions + solutions posted September 1

Here are some sample midterm and final exam questions ... with solutions. Ignore the questions in those files that deal with topics we haven't covered (sometimes we present topics in a different order, or change the topics slightly).


For more sample questions try the tests/quizzes that are released on Connect throughout the term. Those online tests contain lots of sample midterm and final exam questions. Even though they are multiple-choice questions, we often tell students (on exams) to show their work, and we often award part marks for incorrect answers; therefore, we encourage you to work out the answers on a sheet of paper.

Introduction to C (Review from APSC 160) - Posted September 4

Recommended programming examples from the text book:

Pointers - Posted September 12

Recommended programming examples from the text book:

Structs - Posted September 23

Recommended programming examples from the text book:

Complexity - Posted October 1

Recommended examples from the text book:

Linked lists - Posted October 5

Recommended programming examples from the text book:

Recommended programming exercises (end of chapter questions) from the text book:

Stack, Queue, and Recursion - Posted October 14

Recommended programming examples and exercises from the text book:

Binary Search Trees - Posted Nov 3

Recommended programming examples and exercises from the text book:

Heaps - Posted Nov 9

Recommended programming examples and exercises from the text book:

Sorting - Posted Nov 19

Recommended programming examples and exercises from the text book:

Hashing - Posted Nov 28

Recommended programming examples and exercises from the text book: