C++ Fundamentals: Procedures, OO Concepts, Pointers, References, and Memory (Vocabulary)

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

flashcard set

Earn XP

Description and Tags

Flashcards covering procedural vs. object-oriented concepts, core C++ features, pointers, references, and dynamic memory basics.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Procedural Concept

The main program coordinates calls to procedures and passes data as parameters.

2
New cards

Object-Oriented Concept

Objects in a program interact by sending messages to each other.

3
New cards

Data Abstraction

Hiding implementation details and exposing only essential features.

4
New cards

Encapsulation

Bundling data with methods to control access; a core OO principle.

5
New cards

Inheritance

Mechanism to create new classes from existing ones, reusing code.

6
New cards

Polymorphism

Ability of different types to respond to the same interface in different ways.

7
New cards

Generic Programming

Writing code that works with any data type using templates and generic containers/algorithms.

8
New cards

Container

A data structure that stores a collection of objects (e.g., Stack, Vector, List).

9
New cards

Stack

A LIFO container where elements are added and removed from the top.

10
New cards

sort (Generic Algorithm)

A generic algorithm that orders elements in a container.

11
New cards

copy (Generic Algorithm)

A generic algorithm that copies elements from one container to another.

12
New cards

search (Generic Algorithm)

A generic algorithm to locate an element within a container.

13
New cards

Pointer

A variable whose value is the memory address of another location.

14
New cards

Dynamic Memory Allocation

Memory allocated at runtime using new/delete; managed by the programmer.

15
New cards

new

Operator that allocates memory on the heap and returns a pointer to the allocated object.

16
New cards

delete

Operator that frees memory previously allocated with new.

17
New cards

delete[]

Operator used to deallocate memory for arrays allocated with new[].

18
New cards

NULL Pointer

A special pointer value NULL; dereferencing it is an error; check before use.

19
New cards

Address-of Operator

The & operator that yields the memory address of a variable.

20
New cards

Dereference Operator

The * operator that yields the value stored at the address the pointer points to.

21
New cards

Pointer Variable

A variable that stores the memory address of another variable (e.g., int* ptr).

22
New cards

Reference Variable

An alias for another variable; must be initialized; no explicit dereferencing.

23
New cards

Why Reference Variables

Used to pass data to functions without copying or needing explicit address passing.

24
New cards

Constant Pointer

A pointer whose own value (the address it holds) cannot be changed.

25
New cards

Pointer to a Constant

A pointer that points to data that cannot be modified through the pointer.

26
New cards

Constant Pointer to a Constant

A pointer that cannot be reassigned and points to const data.

27
New cards

Base address of an array

The array name is its base address; it points to the first element.

28
New cards

Kinds of Program Data

STATIC data (compile-time), DYNAMIC data (via new/delete at runtime), AUTOMATIC data (stack)

29
New cards

Static Data

Memory for global and static variables allocated at compile time.

30
New cards

Dynamic Data

Memory allocated and deallocated at run time using new and delete.

31
New cards

Automatic Data

Variables created on function entry and destroyed on return (stack).

32
New cards

Pointers and Constants (const correctness)

Forms include pointer to const (data can't change), const pointer (pointer can't move), and const pointer to const (both).