Under the hood → clean C++ code → scenario edge cases.
Built for hands-on C++ technical rounds: every chapter pairs exact memory layouts (`vptr`, control blocks, `.data`/`.bss`, hash buckets) with compilable C++23 implementations from scratch, scenario follow-ups, and rapid-fire output puzzles.
Each full chapter below is a 45-minute deep dive. If your interview is tomorrow, open the 1-Day Crash Revision Sheet for plain-English explanations, must-know rules, short memorizable C++ templates, and exact answers to speak.
Module 1 · 6 Chapters
Master raw addresses, pointer arithmetic, const-correctness, stack vs heap segments, placement new, static/global linkage, struct padding, and smart pointer control blocks.
Memory address model, rebinding vs aliasing, nullptr, pointer arithmetic, contiguous vs jagged 2D heap arrays, and function pointer callbacks.
The East-Const / Clockwise rule, const member functions, bitwise vs logical constness with mutable, constexpr compile-time evaluation, and volatile.
Process memory segments, why new/delete differs from malloc/free, how delete[] knows array length, and separating allocation from construction with placement new.
All 4 meanings of static in C++, .data vs .bss segments, internal vs external linkage, thread_local, Static Initialization Order Fiasco, ODR, and Compilation → Linking.
CPU word alignment, why struct member order changes sizeof(T), cache-line false sharing, and diagnosing classic dangling/wild/double-free bugs.
Zero-overhead unique_ptr, how the shared_ptr Control Block tracks strong & weak counts, why make_shared does one allocation, and breaking cycles with weak_ptr.
Module 2 · 5 Chapters
Trace exact construction/destruction order, write crash-proof deep copies, steal resources with noexcept move semantics, leverage RVO, and guarantee exception safety.
Why member initializer lists initialize in declaration order (not list order!), why const and reference members require initializer lists, explicit, and RAII.
Why compiler-generated shallow copy causes double-free crashes on raw pointers, handling self-assignment (a = a), and the exception-safe Copy-and-Swap idiom.
What std::move really does (static_cast<T&&>), stealing heap pointers in O(1), why std::vector refuses to call your move constructor without noexcept, and Rule of 5/0.
How C++17 constructs return values directly in the caller's stack frame, why return std::move(local) pessimizes performance, and const T& lifetime extension traps.
How throw unwinds stack frames calling destructors, why throwing in a destructor triggers std::terminate(), Strong Exception Safety (commit-or-rollback), and std::expected.
Module 3 · 5 Chapters
Go beyond textbook OOP definitions: inspect vptr and vtable byte layouts, prevent object slicing and destructor leaks, resolve the Diamond Problem, and master C++ casts.
Real-world C++ usage of Encapsulation, pure-virtual Abstraction, public/protected/private Inheritance, and why Composition beats deep inheritance hierarchies.
Exact memory layout of a polymorphic class, how dynamic dispatch resolves virtual calls in two pointer hops, and why calling virtual inside a constructor ignores overrides.
Why deleting a derived object via Base* without a virtual destructor is Undefined Behavior, how pass-by-value slices off derived state, and name hiding across scopes.
How virtual inheritance eliminates duplicate base subobjects in the Diamond hierarchy, and when to use static_cast, dynamic_cast, const_cast, and reinterpret_cast.
How compiler name mangling enables overloading, implementing prefix vs postfix increment, stream operators, C++20 <=> spaceship, and controlled encapsulation with friend.
Module 4 · 4 Chapters
Understand compile-time template instantiation, specialization, universal references (T&&), perfect forwarding, variadic parameter packs, C++20 concepts, and lambda closures.
How templates generate concrete types at compile time, writing full and partial specializations (e.g. for pointers or fixed sizes), and non-type template parameters.
Why T&& in a deduced template context binds to both lvalues and rvalues, the 4 reference collapsing rules, and how std::forward preserves value category in factory functions.
Unpacking variadic template arguments with fold expressions, compile-time branching with if constexpr, and replacing cryptic SFINAE errors with C++20 concepts.
How the compiler lowers a lambda into an anonymous struct with operator() const, dangling reference capture traps, init-capture for move-only types, and std::function type erasure.
Module 5 · 6 Chapters
Deep-dive into every C++ STL container family: internal memory structures, Big-O guarantees, custom comparators & hashers, iterator invalidation tables, and SSO strings.
Contiguous buffer vs segmented chunk-map vs doubly linked nodes: when to choose vector, deque, list, forward_list, or std::array, plus cache locality and capacity traps.
How Red-Black Trees guarantee O(log N) worst-case operations, why operator[] on a const or missing key is a bug magnet, range queries, and strict-weak-ordering comparators.
Bucket chaining internals, load_factor vs max_load_factor, preventing O(N) rehash spikes with reserve(), and writing custom hash functors for pairs and structs.
How container adaptors wrap deque and vector, binary heap parent/child index math in priority_queue, custom priority comparators, and cache-friendly C++23 flat_map.
The #1 STL interview topic: exact rules for when push, erase, or rehash invalidates iterators and references across every container, plus erase_if and key STL algorithms.
How std::string stores short strings inline on the stack without heap allocation (SSO), zero-copy slicing with std::string_view, lifetime traps, and contiguous views with std::span.
Module 6 · 6 Chapters
Step-by-step, interview-ready C++ implementations of the data structures and smart pointers interviewers ask you to code live, including Doubly Linked List scenario mutations.
Build a bug-free DoublyLinkedList<T> using dummy sentinels (eliminating null-check spaghetti) and solve 6 real interview scenarios: safe erase while iterating, O(1) splice, reversal, and repairing broken links.
Implement a production-grade generic MyVector<T> from scratch using raw operator new and placement new so it works even for types without default constructors, complete with Rule of 5 and exception safety.
Implement MyString from scratch with invariant-preserving null termination, Copy-and-Swap assignment, O(1) move semantics, concatenation, and an SSO union buffer demonstration.
Code UniquePtr<T> (move-only RAII wrapper) and SharedPtr<T> (heap Control Block with std::atomic<size_t> reference counting) from scratch and test edge cases like self-reset.
Implement a generic hash table from scratch supporting put, get, erase, and automatic 2x rehashing when load factor exceeds 0.75, plus open-addressing tombstone mechanics.
Why OS new/delete hurts low-latency systems, and how to write a fast O(1) Free-List Memory Pool and ObjectPool<T> using embedded next-pointers and placement new.
Module 7 · 6 Chapters
Master threads, jthread, mutexes, deadlock avoidance, condition variable synchronization puzzles (Odd-Even, Producer-Consumer), atomics, Thread Pool implementation, and concurrent data structures.
Spawning threads with functions, lambdas, and member functions; why passing references requires std::ref; why an unjoined std::thread crashes the process; and C++20 std::jthread auto-join & cancellation.
Protecting critical sections with RAII locks, reproducing and curing a 2-mutex Bank Transfer deadlock using lock hierarchy and std::scoped_lock, and Reader-Writer locks with std::shared_mutex.
How condition_variable sleeps without burning CPU, why the while-predicate loop is mandatory against spurious wakeups, and coding Print Odd-Even, 1-2-3 Sequence, and Bounded Blocking Queue.
Why i++ is a data race, writing lock-free spinlocks and CAS loops with std::atomic, memory ordering intuition, and why C++11 static locals and std::call_once replaced broken Double-Checked Locking.
Returning values and exceptions across threads with future/promise, launch::async vs deferred traps, and coding a complete multi-worker C++ ThreadPool from scratch.
Why wrapping individual STL methods in a mutex still has interface race conditions, designing a race-free ThreadSafeQueue<T>, and adding concurrency to a Doubly Linked List / LRU Cache.
Module 8 · 2 Chapters
High-yield C++ design patterns (including Pimpl and weak_ptr Observer) plus a complete 65-minute Round 1 checklist and rapid-fire output/bug-spotting drill.
Fast, interview-ready C++ implementations of Singleton, Factory, Strategy, leak-free Observer (using weak_ptr), Decorator, Adapter, Command, and the C++ Pimpl Idiom.
How to structure your 65-minute C++ interview round: defending past projects, the 10-point C++ edge-case checklist before saying 'Done', and a multi-topic bug-spotting & output gauntlet.