Skip to content

CT 301 Exam 2 Topics

CT 301: C++ Fundamentals · Summer 2026
Exam 2 Topics
Instructor: Dr. Francisco R. Ortega

Scope

Exam 2 covers the Homework 2 material: the implementation of ct::Vector<T>. Anything from the assignment is fair game, including both the interface you implemented and the reference implementation provided to you. You should be able to read, explain, and reason about any part of it, not only how to use the vector but how its internals work and why. The list below is the full set of topics it can draw on, each with where to read.

How to prepare. Work through Homework 2 and Labs 3 and 4, and be ready to trace and explain the reference code. The hands-on explorations in Labs 3 and 4 are direct practice for this exam. The exam uses different problems on these same concepts, so understanding why the code behaves as it does matters more than memorizing any one piece of it.

1. Memory management on the free store

Where to read: L7 · Tour §1.7, §5.2, §15.2 · PPP Ch. 15 · learncpp: 12.7, 19.1, 15.4 (placement new / ::operator new: no direct lesson)

2. Pointers, arrays, and iterators

Where to read: L7, L8 · Tour §1.7, §15.3-15.4 · PPP Ch. 15-16 · learncpp: 12.7, 17.9

3. Essential operations: the rule of 5/7

Where to read: L9 · Tour Ch. 6, §16.6 · PPP Ch. 17 · learncpp: 14.14, 21.12, 21.13, 22.3

4. Element access and operators

Where to read: L6, L9 · Tour Ch. 6, §5.2.2 · PPP Ch. 17 · learncpp: 21.9, 21.x (operators)

5. Capacity and growth

Where to read: L7 · Tour §5.2, §15.3 · PPP Ch. 15 · learncpp: no direct lesson (manual capacity and growth are vector-internal)

6. The full Vector interface: constructors and modifiers

Where to read: L7, L9 · Tour §5.2.2, Ch. 6 · PPP Ch. 15, 17 · learncpp: initializer-list constructors are covered in passing; the modifier set is vector-specific

7. Templates and member types

Where to read: L10 · Tour Ch. 7 · PPP Ch. 18 · learncpp: 11.6, 13.13

8. Exceptions

Where to read: L10 · Tour §4.2 · PPP Ch. 18 · learncpp: 27.2

9. Idioms used in the implementation

Where to read: L9, L10 · Tour Ch. 6, §16.6, Ch. 7 · PPP Ch. 17-18 · learncpp: 22.3, 27.2 (noexcept, perfect forwarding: no single lesson)

10. The driver

Where to read: Applies areas 1-9; no separate reading (your own code that uses the vector).

Where to read (at a glance)

The same mapping as above, gathered in one place.

Topic areaLectureA Tour of C++ 3e (required)PPP 3e (optional)learncpp (if any)
1. Memory management on the free storeL7§1.7, §5.2, §15.2Ch. 1512.7, 19.1, 15.4 (placement new: no direct lesson)
2. Pointers, arrays, and iteratorsL7, L8§1.7, §15.3-15.4Ch. 15-1612.7, 17.9
3. Essential operations: rule of 5/7L9Ch. 6, §16.6Ch. 1714.14, 21.12, 21.13, 22.3
4. Element access and operatorsL6, L9Ch. 6, §5.2.2Ch. 1721.9, 21.x (operators)
5. Capacity and growthL7§5.2, §15.3Ch. 15no direct lesson (vector-internal)
6. Constructors and modifiersL7, L9§5.2.2, Ch. 6Ch. 15, 17init-list in passing; modifiers vector-specific
7. Templates and member typesL10Ch. 7Ch. 1811.6, 13.13
8. ExceptionsL10§4.2Ch. 1827.2
9. Implementation idiomsL9, L10Ch. 6, §16.6, Ch. 7Ch. 17-1822.3, 27.2 (noexcept, forwarding: no single lesson)
10. The driverapplies areas 1-9(none)(none)your own code that uses the vector

Also from the lectures (beyond the HW2 code)

These topics are taught in lectures 7 through 10 but are not part of the ct::Vector implementation. Review them as context. They are secondary to the areas above, which is where the exam concentrates.

Section numbers (§) refer to A Tour of C++ 3rd ed. (required); chapter numbers in the PPP references are Programming: Principles and Practice using C++ 3rd ed. (optional).