CMPT130 Suggested Text Book Questions
Listed below are some suggested practice questions from Problem Solving with C++, 9th ed. by Walter Savitch. These questions should help you learn the material, and practice the material.
The self-test questions are reasonably straight-forward to answer, and have full answers at the end of each chapter. The practice-programs are somewhat harder, and programming-projects are often longer.
Chapter 1: Intro
- Practice Programs: 1, 2, 4, 5.
- Programming Projects: 3.
Chapter 2: Variables, Expressions, some if/while
- Practice Programs: 1, 2, 5.
- Programming Projects: 1, 2, 3, 5, 7, 8, 9, 12, 13, 14.
Chapter 3: bool, complex if, more looping
- Practice Programs: 1, 5, 7.
- Programming Projects: 3, 4, 6, 9, 11, 12, 13.
Chapter 4: Functions (part 1)
- Practice Programs: 1, 2, 6.
- Programming Projects: 2, 4, 6.
Content mainly covered after midterm
Chapter 5: Functions (part 2)
- Self Test Exercises: 1, 3, 7, 8, 9, 10, 11, 12, 14.
- Practice Programs: 2, 3, 4, 9.
- Programming Projects: 1, 4.
Chapter 6: Files
- Self Test Exercises: 1, 2, 3, 4, 5, 7, 12, 16, 19.
- Practice Programs: 1, 2, 3, 4, 5.
- Programming Projects: 1, 2, 4, 6, 7, 10, 11, 13, 14.
Chapter 7: Arrays
- Self Test Exercises: 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 16, 17, 18.
- Practice Programs: 1, 2, 4.
- Programming Projects: 1 (file version suggested), 2, 3, 5 (skip sorting), 7, 14.
Chapter 8: String & Vectors
- Self Test Exercises: 15, 16, 19.
- Practice Programs: 3, 4, 5, 7.
- Programming Projects: 6, 11, 14, 16.
Chapter 9: Pointers & Dynamic Memory
- Self Test Exercises: 1, 3, 4, 5, 10, 12, 13.
- Practice Programs: 1, 2.
- Programming Projects: 1, 2.
Chapter 10.1: Structures
- Self Test Exercises: 1, 2, 6, 8.