C++ CPP study guide
C++ CPP · Work through your exam, one topic at a time.
This independent study page provides practice for C++ CPP. Its editorial learning areas include C++ standard containers, iterators and algorithm contracts; C++ templates, callable objects, streams and exceptions; C++ types, expressions, functions and control flow; C++ object lifetime, ownership, classes and polymorphism. The questions develop subject knowledge and application through worked reasoning, distinctions between competing answers, and practical scenarios. Study the relevant guide before attempting a mixed set, then explain the evidence or calculation that supports each answer. Topics on this exam: C++ standard containers, iterators and algorithm contracts, C++ templates, callable objects, streams and exceptions, C++ types, expressions, functions and control flow, and C++ object lifetime, ownership, classes and polymorphism. The C++ CPP study guide has 4 sections and about 1,504 words.
01C++ standard containers, iterators and algorithm contracts
A container supplies a data representation with particular access, insertion, invalidation and complexity properties. A vector supports contiguous storage and random access, while growth can reallocate and invalidate relevant references and iterators.
368 words, about 2 min02C++ templates, callable objects, streams and exceptions
A template describes a family of declarations instantiated under its rules. Deduction must satisfy the declared parameter relationships; a single T for two arguments does not automatically accept every mixed-type call by guessing a preferred conversion.
386 words, about 2 min03C++ types, expressions, functions and control flow
A C++ exercise needs the relevant language version, declarations and input assumptions. Use the actual included standard headers rather than depend on a compiler’s accidental transitive includes.
366 words, about 2 min04C++ object lifetime, ownership, classes and polymorphism
A pointer can designate an object, but the pointer itself does not prove that the object is alive or accessible. Dereferencing a null, invalid or dangling pointer is not a valid way to inspect a value.
384 words, about 2 min