1/24
Vocabulary flashcards covering C++ variables, type initialization, qualifiers, operators, casting, formatted I/O, and program tracing based on Week 8B lecture slides.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Declaration
Tells the compiler a name and a type, and reserves memory for it.
Copy-init
The classic C-style initialization form (for example, intx=0;).
Direct-init
Constructor-style initialization syntax (for example, intx(0);).
Brace-init
Modern C++ (C++11+) initialization syntax (for example, intx{0};) that blocks narrowing conversions.
Signed types
Data types that can hold both negative and positive values.
Unsigned types
Data types that hold only zero and positive values, using the freed-up range for larger positive numbers.
auto
Keyword telling the compiler to figure out a variable's type from its initializer at compile time.
decltype(expression)
Gives a new variable the exact same type as the specified expression.
std::string
A class from the
Digit Separators
The apostrophe character (') used in numeric literals (C++14+) purely for visual readability without affecting the value.
Raw String Literals
String literals written as R"(…)" that bypass escaping entirely and treat backslashes and line breaks literally.
const
A qualifier that locks a variable's value at initialization, making it read-only so reassigning it causes a compile error.
A preprocessor directive that performs blind text replacement of an identifier before compilation starts.
Chained Assignment
An expression like x=y=z=5; that evaluates right-to-left, assigning the value to each variable in sequence.
Post-increment
Increment syntax (x++) where the expression evaluates to the variable's current value before incrementing it.
Pre-increment
Increment syntax (++x) where the variable is incremented first before its new value is evaluated in the expression.
Comma Operator
An operator that evaluates expressions left to right, returning the value of the rightmost expression.
Implicit Casting
Automatic type conversion performed by the compiler without explicit programmer request.
Explicit Casting
Directly requesting a type conversion in code, even if data truncation occurs.
static_cast
Modern C++'s preferred, explicit, searchable, and type-checked form of casting.
sizeof
An operator that returns the memory size of a data type or variable in bytes.
setw(n)
An output manipulator from
setprecision(n)
An output manipulator setting the total significant digits (or decimal places when combined with fixed) for floating-point output.
getline
An input function (getline(cin, stringVar)) that reads an entire line, including spaces, up to the newline character.
Program Tracing
Walking through code line by line as the computer would, recording variable values at each step to find logical errors.