C++ Programming Fundamentals - Variables, Types, Operators & I/O

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering C++ variables, type initialization, qualifiers, operators, casting, formatted I/O, and program tracing based on Week 8B lecture slides.

Last updated 10:11 AM on 10/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Declaration

Tells the compiler a name and a type, and reserves memory for it.

2
New cards

Copy-init

The classic C-style initialization form (for example, int x=0;int\,x = 0;).

3
New cards

Direct-init

Constructor-style initialization syntax (for example, int x(0);int\,x(0);).

4
New cards

Brace-init

Modern C++ (C++11+) initialization syntax (for example, int x{0};int\,x\{0\};) that blocks narrowing conversions.

5
New cards

Signed types

Data types that can hold both negative and positive values.

6
New cards

Unsigned types

Data types that hold only zero and positive values, using the freed-up range for larger positive numbers.

7
New cards

auto

Keyword telling the compiler to figure out a variable's type from its initializer at compile time.

8
New cards

decltype(expression)

Gives a new variable the exact same type as the specified expression.

9
New cards

std::string

A class from the library that holds a full, resizable sequence of characters.

10
New cards

Digit Separators

The apostrophe character (') used in numeric literals (C++14+) purely for visual readability without affecting the value.

11
New cards

Raw String Literals

String literals written as R"(…)" that bypass escaping entirely and treat backslashes and line breaks literally.

12
New cards

const

A qualifier that locks a variable's value at initialization, making it read-only so reassigning it causes a compile error.

13
New cards

define

A preprocessor directive that performs blind text replacement of an identifier before compilation starts.

14
New cards

Chained Assignment

An expression like x=y=z=5;x = y = z = 5; that evaluates right-to-left, assigning the value to each variable in sequence.

15
New cards

Post-increment

Increment syntax (x++) where the expression evaluates to the variable's current value before incrementing it.

16
New cards

Pre-increment

Increment syntax (++x) where the variable is incremented first before its new value is evaluated in the expression.

17
New cards

Comma Operator

An operator that evaluates expressions left to right, returning the value of the rightmost expression.

18
New cards

Implicit Casting

Automatic type conversion performed by the compiler without explicit programmer request.

19
New cards

Explicit Casting

Directly requesting a type conversion in code, even if data truncation occurs.

20
New cards

static_cast

Modern C++'s preferred, explicit, searchable, and type-checked form of casting.

21
New cards

sizeof

An operator that returns the memory size of a data type or variable in bytes.

22
New cards

setw(n)

An output manipulator from that reserves a fixed-width field of size n for the very next value printed.

23
New cards

setprecision(n)

An output manipulator setting the total significant digits (or decimal places when combined with fixed) for floating-point output.

24
New cards

getline

An input function (getline(cin, stringVar)) that reads an entire line, including spaces, up to the newline character.

25
New cards

Program Tracing

Walking through code line by line as the computer would, recording variable values at each step to find logical errors.